问题
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:
You have to use SQLDataSources function from ODBC32.DLL. For example.
来源:https://stackoverflow.com/questions/7675412/get-the-list-of-odbc-data-source-names-programatically-using-delphi