Link to home
Start Free TrialLog in
Avatar of DavidLeeding
DavidLeeding

asked on

Can Delphi imitate the MS Access "Linked Table Manager" function?


Does anyone know a way of using Delphi to peform the tasks of the "Linked Table Manager" function on an MS Access database? (ie reassign the database path for a specific table)



Avatar of kretzschmar
kretzschmar
Flag of Germany image

ado, bde or jet-sql?
Avatar of DavidLeeding
DavidLeeding

ASKER

The Delphi app will accessing the MS Access database using ADO.
I would check the ADO help, and then translate the examples there into Delphi.
If you use the Jet engine (DAO), then you can detach and attach the table(s) from/to the TablDefs collection.
Example:

TableDef := Database.CreateTableDef(TableName, 0, TableName, Connect);

Database.TableDefs.Append(TableDef);
Try www.opus.ch; the DirectAccess (free, open source) provides easy access to perhaps this functionality also.  It provides easy access to TableDefs, etc also.
aikimark

Thanks. Your example looks close to the kind of solution I'm after...but having not used DAO from within Delphi before (normally use ADO, BDE etc)...I need the example padded out a bit.

ie how did you declare the database object in your example? One I know that, I think I'll be able to acheive my goal!
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
DavidLeeding:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
Thanks for the examples!