Obtain and install the appropriate ODBC driver for your database.
The Microsoft MDAC download contains many updated drivers, but in many cases you can contact the database vendor to find out if they supply an ODBC driver. Very often the vendor supplies an ODBC driver free with their database, or supplies the latest version of an ODBC driver free on their website. Simply obtain the required ODBC driver, and install it on your machine.
After installing the ODBC driver, you must configure the ODBC driver for your particular environment and add a System DSN (Data Source Name) for your database (not a User DSN).
This configuration is done through the ODBC Administrator, found under the Control Panel. Here are some basic instructions on how to add a System DSN:
1. Start button --> Settings --> Control Panel
2. Double click on the 32bit ODBC icon in the Control Panel. Under Windows 2000 and later, this options is under Administrative Tools\Data Sources (ODBC)
3. The User DSN tab appears by default.
4. Click the System DSN tab first. Click the Add button
5. The Create New Data Source window will appear. Select the appropriate driver and click Finish (if a driver for the database you wish to connect to does not appear in the list, then you will need to acquire and install the driver first).
6. The Data Source Setup window appears. Provide a name for the data source.
From this point forward, procedure varies slightly depending on the driver. Check the documentation of your driver for how to set it up.
For some you must point the System DSN at the folder or file where the database resides.
7. Click OK. Click OK again.
8. The new System DSN will now appear in the list. The name of the driver will be in parentheses next to it. Close the ODBC administrator.
Either use a connection string of
Provider=MSDASQL.1;Persist Security Info=False;Data Source=Your System DSN Name
or use the Build button to create a connection string using a provider of Microsoft OLE DB Provider for ODBC Drivers, then on the Connection tab, choose your System DSN name in the drop-down list. Ensure you click Test Connection to ensure everything is working properly. See OLE DB Setup for more information.