Solved

Checking the connection string of a linked table

Posted on 2011-09-22
4
211 Views
Last Modified: 2012-06-27
How can I get the full connection string of a linked odbc table?

I would like to be able to evaluate the string in code, specifically the name of the server is what I am looking for.

The name of the table is t_companies.


Thanks
0
Comment
Question by:snyperj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36580441
run this query


select [name],connect
from msysobjects
where [name]="t_companies"
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 36580466
It's in the MSysObjects table. Give this a try:

 DLookup("Connect","MSysObjects","[Name]='t_companies'")

Or using a variable:

 DLookup("Connect","MSysObjects","[Name]='" & strTableName & "'")



0
 
LVL 61

Expert Comment

by:mbizup
ID: 36580504
<evaluate the string in code>

I was assuming that you wanted this in VBA...

Also take a look at Jim Dettman's article on DLookup and the Domain functions for this sort of requirement:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_12-Dlookup-and-the-Domain-Functions.html
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36580643
;-)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question