使用Delphi以编程方式获取ODBC数据源名称列表 [英] Get the list of ODBC data source names programatically using Delphi
本文介绍了使用Delphi以编程方式获取ODBC数据源名称列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我看到几个示例,其中源名称列表来自注册表(HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ODBC数据源)。有没有其他方法可以获取ODBC数据源名称列表?
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?
我只需要使用Delphi标准组件,所以我不能使用3d方解决方案。
I need to work only with Delphi standard components, so I can not use 3d party solutions.
推荐答案
你必须使用 SQLDataSources 函数从ODBC32.DLL。 示例。
You have to use SQLDataSources function from ODBC32.DLL. For example.
这篇关于使用Delphi以编程方式获取ODBC数据源名称列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文