Get the list of ODBC data source names programatically using Delphi

故事扮演 提交于 2019-12-19 02:39:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!