![]() |
| Previous Top Next |
ODBC Connections |
This section describes how to connect to a DB via ODBC. The steps listed below describe a connection to an IBM DB2 database, but they apply also to other types of databases that can be connected via ODBC. To connect using an ODBC connection, do the following:
| 1. | In the Open Database dialog, select ODBC Connections. |

| 2. | Select one of the options for specifying a Data Source Name (DSN). If you select System DSN or User DSN, the available DSNs are displayed in the Data Source pane. If you select File DSN, you are prompted to browse for the DSN file. Alternatively, you can build a connection string to the DB by selecting the Build a Connection String option. |
| 3. | If you wish to add a DSN to those in the Data Source pane, do the following: (i) click the dropdown arrow of the Create a New Data Source icon |

(iv) click OK to finish. The DB is added as a Data Source to the list in the Data Source pane.
| 4. | After you have selected the DataSource (via the System DSN or User DSN option), or selected a DSN File (File DSN option), or built a connection string (Connection String option), click Connect. |
| 5. | When you are prompted for your user ID and password, enter these and then click OK. The connection is made and a dialog appears in which you select the required DB information. How to do this is described in the section DB Data Selection. |
| Note: | The listing in the data source pane (when the System DSN or User DSN option is selected) can be edited using the Edit Selected DSN, Remove Selected DSN, and Refresh Listed DSNs icons at the bottom of the ODBC Connections screen. |
Building a connection string
In the ODBC Connections screen, when you select the Build a Connection String radio button, the Select Data Source dialog (screenshot below) pops up. You can either select a File DSN (in the File Data Source tab), or select a data source that is available on your machine (listed in the Machine Data Source tab).

Clicking OK pops up a dialog that prompts for user information, including the User ID and password. When you click OK in this dialog, the connection string is entered in the ODBC Connections screen.
| Note: | When an ODBC connection is used to connect to an MS Access DB, data in the DB cannot be edited. |
See also:
DBs and StyleVision, for a description of how DBs work with StyleVision.
DB Data Selection, for a description of how to select tables or structures in the DB as the schema and data sources.
The DB Schema and DB XML files, for a description of the XML Schema and XML data files that are generated from the DB when it is loaded in StyleVision.
Connection Wizard, for information about connecting to a DB using StyleVision's Connection Wizard.
ADO Connections, for information about connecting via ADO.
Datatype Conversions: DB to XSD, for mappings of DB datatypes to XSD datatypes when the XML Schema is generated from the DB.
|