Enumerating ODBC Data Sources and Drivers

The ODBC API provides ways to enumerate both DSN (Data Sources) and ODBC Drivers, and it’s actually pretty easy to do once you know where to look. Here’s a sample that shows User and System DSNs installed on the system, as well as available drivers. It’s a full MFC application,but it’s pretty simple, and it’s UI is pretty simmilar to the ODBC configuration control panel applet. The App is written in VC++ 6.0, but should be easy to move to 5.0.

As a plus, the sample shows how to use a CPropertySheet as the app’s main window (instead of a dialog), and how to use parent classes based on MFC to add more code reusability, while keeping the ability to use ClassWizard to add message handlers.

Now, download the files from here

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>