Database Toolbox Previous page   Next Page

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.

To set up the data source:

  1. Close the database in the database program. For the examples, if Microsoft Access is open, be sure to close the databases tutorial.mdb and Nwind.mdb.
  2. From the Windows Start menu, select Settings -> Control Panel -> 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 the first sample data source, type dbtoolboxdemo as the data source name.

    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 4 through 8 to set up the data source for the other example database, Nwind.
  4. Click OK to close the ODBC Data Source Administrator dialog box, which now contains the dbtoolboxdemo and SampleDB data sources.

Previous page  Setting Up a Data Source Setting Up a Data Source for JDBC Drivers Next page

© 1994-2005 The MathWorks, Inc.