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] "RG" <RG@discussions.microsoft.com> wrote in message
news:227BCE04-C3D6-4F74-9236-855B2DAB10A8@microsoft.com...
> 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)?
>
> Thanks.