Use an ODBC connection to access attribute or point data in Microsoft Access, Microsoft Excel, or dBASE.
To access ODBC data
- In the
Display Manager
, click DataConnect To Data.
- In the Data Connect window, select Add ODBC Connection in the Data Connections By Provider list.
- Under Connection Name, type a name for this connection.
- 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.
- For 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.
- If required by the table, enter your user name and password.
- Click Test Connection.
- Select the classes to add to the map.
If you are connecting to a Microsoft Excel source, first click Identity Property cell for each class you are adding. In the drop-down that displays, select the identity properties for this class. You can select multiple properties, but each one must contain unique values. Once you select the identity properties, you can select the check box for the class.
- Click Connect.
If you are connecting to a data store that contains attribute data only, you can now join that data to another geospatial data store. You do not need to specify a coordinate system or add the data to the map.
- Under Add Data To Map, select the tables.
- If you are adding geometric data, for each table, specify the coordinate system.
- 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.
- 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. If you are connecting to attribute data only, you do not need to click Add To Map.
To create a DSN in Windows XP
- From your Windows desktop, click Start menu SettingsControl Panel and open the Administrative Tools control panel.
- Double-click Data Sources (ODBC).
- 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.
- Click Add and select the driver to use.
For example, to create a DSN for an Access database, select Microsoft Access Driver.
- 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
- In Excel, open the Excel worksheet.
- Select all the data.
- Define a named range.
- Enter a name for the feature class, for example, Country_Literacy.
- Close Excel.