I saw several examples where the list of the source names were took from registry (HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ODBC Data Sources). Is there any other way to get the list of ODBC data sources names?
I need to work only with Delphi standard components, so I can not use 3d party solutions.
1. Click the Windows "Start" button and then click "Control Panel." Click "System and Security." Click "Administrative Tools" in the list of utilities. Double-click the icon labeled "Data Sources (ODBC)." A list of DSNs display.
On the Start menu, click Control Panel. In Control Panel, click Administrative Tools. In Administrative Tools, click Data Sources (ODBC).
A data source name (DSN) is a data structure that contains the information about a specific database that an Open Database Connectivity ( ODBC ) driver needs in order to connect to it.
You have to use SQLDataSources function from ODBC32.DLL. For example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With