Accessing Data from ODBC
Concept Procedure Quick Reference
 
 
 

To access ODBC data

  1. In the Display Manager, click DataConnect To Data.
  2. In the Data Connect window, select Add ODBC Connection in the Data Connections By Provider list.
  3. Under Connection Name, type a name for this connection.

    You can give the connection any name you like. This name appears in Map Explorer as the name of the feature source.

  4. Under Source Type, select one of the following:
    • Data Source Name (DSN) — Use a DSN you have defined in your Windows Control Panel. See the following.
    • Connection String — The connection string specifies the driver and path to use.
  5. Under source, specify the table.
    • Data Source Name (DSN) — Click the browse button and select the DSN.
    • Connection String — Specify the driver and path. For a Microsoft Access database, use the format:

      Driver={Microsoft Access Driver (*.mdb)};DBQ=pathname\filename.mdb

      Where pathname\filename.mdb is the complete path and filename of the Microsoft Access database. Note the curly braces and the space before “(*.mdb)” For more information, see the ODBC documentation on the Microsoft Web site.

  6. If required by the table, enter your user name and password.
  7. Click Connect.
  8. Under Add Data To Map, select the tables.
  9. For each table, specify the coordinate system.
  10. Specify the columns to use for point geometry. This can be latitude/longitude or X, Y, and Z Coordinates. To specify the column name, click in the field, then click the down arrow to choose from a list of column names.
  11. Click Add To Map.

    If Add To Map is grayed out, check that you have specified the coordinate system and X and Y columns for the table.

To create a DSN in Windows XP

  1. From your Windows desktop, click Start menu Settings Control Panel and open the Administrative Tools control panel.
  2. Double-click Data Sources (ODBC).
  3. In the ODBC Data Source Administrator, click User DSN or System DSN.

    A User DSN is visible only to you. A System DSN is visible to all users on the current machine.

  4. Click Add and select the driver to use.

    For example, to create a DSN for an Access database, select Microsoft Access Driver.

  5. In the ODBC Microsoft Access dialog box enter information about the data. When you finish, click OK. Click OK again to close the ODBC Data Source Administrator dialog box.

The DSN you defined appears in the DSN list in the Data Connect window.

To define the table ranges required to access Excel data

  1. In Excel, open the Excel worksheet.
  2. Select all the data.
  3. Define a named range.
  4. Enter a name for the feature class, for example, Country_Literacy.
  5. Close Excel.