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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

database location property

Status
Not open for further replies.

AdamP

Programmer
Feb 12, 2002
13
0
0
US
Is there a property in VBA code that identifies the database location? I want to query on a table in the same database, but I need to always change my connection string in the "open database" method based on where the database is, b/c it is on different computers.
 
You may not get too many responses unless you clarify your problem statement. We have to make assumptions about what your problem is to even get a start on helping. It kind of sounds like you are using ADO connection objects to connect to remote databases (with no link into your client) and you want to have some function to tell you where the database may be. I know of no function or any way for a function to even guess where a remote database may reside. These are frequently set as constants in the client or as elements in the registry if you make it configurable through a form.

If however, you have links to the remote tables, then the table.connection property contains the string information you could use to derive the information. But, then you wouldn't need the ADO connection object, right?

Hope I'm at least close to target.

Steve King Growth follows a healthy professional curiosity
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top