Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set linked table connect string to missing path?

Status
Not open for further replies.

Trevil

Programmer
Jun 19, 2003
459
US
Hi All,
Is there any way to set the connect string for a linked table to a path that is currently not available? When we deploy our application, the database tables will reside at "\\server\company\finance\backend.mdb", and we create that link using our "testing lab environment". However, our normal workstations that are used for development do not have any such path "\\server\...".

I have tried playing with HOSTS and LMHOSTS, but don't have a clue.
Thank you for any suggestions.

Learn from the mistakes of others. You won't live long enough to make all of them yourself.
 
How about the connect property:

Code:
Set db = CurrentDb
Set tdf = db.TableDefs("tblTable")
tdf.Connect = ";DATABASE=\\server\company\finance\backend.mdb"
Debug.Print tdf.Connect
 
Thank you for the reply. Unfortunately when you issue the "tdf.RefreshLink" to save the change, it discovers my sneaky attempt and slaps me.

Learn from the mistakes of others. You won't live long enough to make all of them yourself.
 
Oops, forgot that bit. How about using a small form in the start-up that checks for the existence of the back-end and relinks, continues or sulks, accordingly?
 
Yes, I have code that can test for the backend and then relink if needed, but I would like to be able to ship out an MDE that is ready to run as is. Longer term I may be able to convince the QA folks that setting the link via code is not a violation of National Security, but I may give up and retire before then!


Learn from the mistakes of others. You won't live long enough to make all of them yourself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top