Solved

Checking the connection string of a linked table

Posted on 2011-09-22
4
208 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
  • 2
  • 2
4 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
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 119

Expert Comment

by:Rey Obrero
ID: 36580643
;-)
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Search Form with Run Time Error 3075 1 23
Running sum query 6 33
Track name AutoCorrect info 14 48
Setting a DEFAULT value within a linked table 4 13
This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

867 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now