[AccessD] OT - Acessing File DSN Coonection String Using VB6

MartyConnelly martyconnelly at shaw.ca
Wed Jan 25 13:35:41 CST 2006


Any easy way to get the connection string if you know the DSN
Open an empty file in notepad then immediately save with a name MyDSN.udl
then double click on MyDSN.udl in explorer
This will bring up the Data Link Properties  essentialy one of the 
control applets
Select the Connections Tab
select 1. use data source names and from the combobox select the DSN
Now click OK
Now reopen MyDSN.udl in notepad and you will see the saved connection 
string.
This file is actually binary not text format

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlmag2k/html/LinkAPI.asp

I believe there is some way to get at the DataLink API
via something like

Set dl = New MSDASC.DataLinks

Paul Hartland (ISHARP) wrote:

>To all,
>
>Don't know if this is possible I have a File DSN on my machine and what I
>want to do is access it using VB6 and get various properties of it like the
>connection string etc.  Has anyone done this before or can point me in the
>right direction on how to go about this if it is possible.
>
>Thanks in advance.
>
>Paul Hartland
>Database Developer
>
>
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list