Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to test if an ODBC DSN exists?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00862216
Message ID:
00862288
Views:
17
Hi Joel,

As well as reading ODBC parameters from the Registry -- it's also possible to use SQLDataSources API function combined with several other API calls:
SQLAllocEnv
SQLAllocHandle
SQLFreeEnv
SQLFreeHandle
SQLGetEnvAttr
SQLSetEnvAttr
FoxPro examples (some of them in members area):

How to get a list of system DSNs (Data Source Name) with parameters
http://www.news2news.com/vfp/?example=375

List of ODBC drivers installed (read from the [ODBC Drivers] section)
http://www.news2news.com/vfp/?example=378

Enumerating ODBC Data Sources available on the local computer
http://www.news2news.com/vfp/?example=284

Enumerating ODBC drivers available on the local computer
http://www.news2news.com/vfp/?example=285

Saving HKEY_LOCAL_MACHINE\\Software\\ODBC Registry Entries to an XML file
http://www.news2news.com/vfp/?example=379
Previous
Reply
Map
View

Click here to load this message in the networking platform