ODBC DataSources 
Author Message
 ODBC DataSources

Hi,

A nice simple one...

How can you get a list of registered Data Source Names through VB code? (I
want to populate a listbox with these DSNs.) I've been trying, rather
unsuccesfully, to use the ODBC API call LoadDataSources; can this be done
through RDO? Or ADO? Or at all?

Cheers,

Philip Dunkerley



Mon, 06 Aug 2001 03:00:00 GMT  
 ODBC DataSources
Use the ODBC API SQLDataSources.  You can also see the VisData VB sample
which does exactly what you want to do.

Good Luck

Alain Lavoie
LavaSteele Corp.

Quote:

>Hi,

>A nice simple one...

>How can you get a list of registered Data Source Names through VB code? (I
>want to populate a listbox with these DSNs.) I've been trying, rather
>unsuccesfully, to use the ODBC API call LoadDataSources; can this be done
>through RDO? Or ADO? Or at all?

>Cheers,

>Philip Dunkerley



Sat, 11 Aug 2001 03:00:00 GMT  
 ODBC DataSources
Hi Philip,

Get the info out of the ODBC.INI file (in the WINNT directory on NT).

Cheers,
Dave

Quote:

>Hi,

>A nice simple one...

>How can you get a list of registered Data Source Names through VB code? (I
>want to populate a listbox with these DSNs.) I've been trying, rather
>unsuccesfully, to use the ODBC API call LoadDataSources; can this be done
>through RDO? Or ADO? Or at all?

>Cheers,

>Philip Dunkerley



Sat, 11 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ODBC Datasources

2. Selecting ODBC Datasources

3. Changing ODBC datasources in CR5.0

4. Listing ODBC Datasources

5. Listing ODBC datasources using DLL functions RegEnumValueA : NO GO!

6. Crystal Reports bug when connecting via ODBC to 2 different datasources

7. Datasources...

8. Reuse datalist with multiple datasources?

9. Datasources in controls

10. Non relational datasources and ADO 2.5

11. Join QueryDef with two datasources

12. MSHFlexGrid and band operation WITHOUT datasources

 

 
Powered by phpBB® Forum Software