Database Toolbox    

Setting Up a Data Source for ODBC Drivers

Follow this procedure to set up a data source for a PC running Windows whose database resides on that PC or on another system to which the PC is networked via ODBC drivers. This procedure uses as an example, the Microsoft ODBC driver Version 4.00 and the U.S. English version of Microsoft Access 2000 for Windows 2000. If you have a different configuration, you may have to modify the instructions.

If you have Microsoft Access installed and want to use many of the examples in this document as written, set up these two data sources:

To set up the data source:

  1. From the Windows Start menu, select Programs -> Administrative Tools -> Data Sources (ODBC).
  1. The ODBC Data Source Administrator dialog box appears, listing any existing data sources.

  1. Select the User DSN tab.
  1. A list of existing user data sources appears.

  1. Click Add. A list of installed ODBC drivers appears in the Create New Data Source dialog box.
  2. Select the ODBC driver that the local data source you are creating will use and click Finish.
  1. The ODBC Setup dialog box appears for the driver you selected. Note that the dialog box for your driver might be different from the following.

  1. Provide a Data Source Name and Description.
  1. For one example data source, type dbtoolboxdemo as the data source name.

    Note that for some databases, the ODBC Setup dialog box requires you to provide additional information.

  1. Select the database that this data source will use. Note that for some drivers, you skip this step.
    1. In the ODBC Setup dialog box, click Select.
    1. Find and select the database you want to use. For the dbtoolboxdemo data source, select tutorial.mdb in $matlabroot\toolbox\database\dbdemos.
    1. Click OK to close the Select Database dialog box.
  2. In the ODBC Setup dialog box, click OK.
  3. Repeat steps 3 through 7 to set up the data source for the other example database, northwind.
  4. Click OK to close the ODBC Data Source Administrator dialog box, which now contains the dbtoolboxdemo and SampleDB data sources.

  Setting Up a Data Source Setting Up a Data Source for JDBC Drivers