Determining ODBC

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Access Database application that actually ODBCs to a SQL Server
Database.

Is there anyway I can determine what ODBC the Access Database is using to
access the SQL Server Tables from within the Access Dtabase Application???

Thanks in advance for your help...
 
Look at the Connect property of the TableDef objects:

CurrentDb().TableDefs("NameOfTable").Connect

That should contain the name of the DSN.
 
Hi.
Is there anyway I can determine what ODBC the Access Database is using to
access the SQL Server Tables from within the Access Dtabase Application???

Select the Tools -> Options... menu to open the Options dialog window.
Select the "View" tab and ensure that the Show "System objects" check box is
checked. Select the "OK" button to close the window.

Select the Tables tab in the Database Window and scroll until you see the
MSysObjects table. Open this table and find the name of the linked table
you want. In the Connect column for that record you'll see the connection
string for that table, which starts with "DSN=". Whatever is right after
that but before the semicolon is the name of the DSN used for that link.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
You can simply type it in the Immediate Window (which you get to by typing
Ctrl-G). Put a question mark in from of it, and hit Enter once you've
finished typing it. (Remember to replace "NameOfTable" with the name of an
actual linked table in your database, enclosed in quotes)
 
That was simple. Thanks a ton!

'69 Camaro said:
Hi.


Select the Tools -> Options... menu to open the Options dialog window.
Select the "View" tab and ensure that the Show "System objects" check box is
checked. Select the "OK" button to close the window.

Select the Tables tab in the Database Window and scroll until you see the
MSysObjects table. Open this table and find the name of the linked table
you want. In the Connect column for that record you'll see the connection
string for that table, which starts with "DSN=". Whatever is right after
that but before the semicolon is the name of the DSN used for that link.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
Ok, I'll bite. You're new to Access. Why do you want to determine the ODBC?
That's a fairly advanced topic. Are you saying that you want to determine the
source of linked tables? Doug's code works, but so does hovering your mouse
over the linked table. (A tool tip pops up with the table link.)

You can also launch the Linked Table manager and it will display the link source
for all linked tables.

Now, if you want to programmatically change the ODBC connection for a table
or read and parse it, you're going to need to write code in a VBA module, which
gets you back to Doug's suggestion. What do you need to do with this info?
 

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

Back
Top