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

MartyConnelly martyconnelly at shaw.ca
Wed Jan 25 18:15:24 CST 2006


Well the microsoft guys seem to write it as binary Unicode complete with 
a UTF-16 little-endian BOM marker.
It might look different opening it with the old Win95 notepad which 
can't handle saving in unicode.

http://msdn.microsoft.com/library/en-us/dnsqlmag2k/html/apilisting_02.txt

Look under paragraph   Saving the .udl File
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlmag2k/html/LinkAPI.asp

Stuart McLachlan wrote:

>On 25 Jan 2006 at 11:35, MartyConnelly wrote:
>
>  
>
>>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
>>
>>    
>>
>
>No, it's another plain text file, just like a File DSN except that it 
>stores the complete connection string in one line which is semi-colon 
>delimited rather than as one value per line.  So it's harder to 
>parse/manipulate that a File DSN, but easier to grab the complete 
>ConnectionString.
>
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list