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!

Find DSN SQL connection?

Status
Not open for further replies.

huckfinn19

Programmer
Joined
May 16, 2003
Messages
90
Location
CA
Hi, I am writing a small c++ MFC app and I just need a function that could tell me if my SQL DSN connection have been created on this computer... Is there an easy way to do that?

Thanks

Simon
 
That extended proc returns a list of DSNs set up on the server not the client machine.

I have not come across a SQL function that will do what you want. You may be better looking for a C++ solution.

--James
 
How about reading the registry

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\DSNname

And/Or

HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\DSNname


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top