Linked table - Source change

B

Bret

Please,
Searching for a reference or help in using CODE to automatically changes the
source SQL database for all my linked tables. I know how its done manually
but need to do it in the modules.

thank you.
 
M

Michel Walsh

Hi,


If you mean using T-SQL with MS SQL Server, take a look at "Linked
Servers" (and sp_addlinkedserer) , OPENQUERY, OPENROWSET and
OPENDATASOURCE. Use the linked server if you plan to use the data
frequently.

With Jet, use DAO, the object TableDef hold a property Connect that hold
the location of the data (among other things). You have to use the method
RefreshLink to "kick" the change you bring to the Connect property.



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top