all groups > vb.net data > october 2007 >
You're in the

vb.net data

group:

Get the ODBC Database Name and Server name for a known DSN?


Get the ODBC Database Name and Server name for a known DSN? RG
9/25/2007 2:14:02 PM
vb.net data:
Is there a way in a VB.NET 2003 program to get the ODBC Database Name and
Server name for a known DSN (DataSource Name)?

Re: Get the ODBC Database Name and Server name for a known DSN? William (Bill) Vaughn
10/11/2007 10:40:06 AM
A registered DSN is simply a ConnectionString saved to the Registry or to a
file. I would look into the APIs to access the registry to pull out these
values.
The DSN is likely to have the database namd and server name imbedded
therein. I illustrated how to do this in this article (see page 2)
http://www.developer.com/net/net/article.php/11087_3695251_1


--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
[quoted text, click to view]
AddThis Social Bookmark Button