Share via


ODBC Connections

ODBC connections are configured in the system control panel. ODBC connections can be made against any data source for which an ODBC driver has been installed. Visual C++ 6.0 ships drivers for Text files, Access, FoxPro, Paradox, dBase, Excel, SQL Server, and Oracle. When you create an ODBC connection, it automatically receives a Data Source Name (DSN). The DSN is subsequently used to identify connections in data-source controls, such as ADO Data Control and RDO RemoteData Control.

OLE DB Connections   No additional work is necessary to configure an OLE DB connection. For example, if an ODBC data source is created, the OLE DB provider for ODBC automatically detects it.

To configure an ODBC data source

  1. Click on the Start button, select Settings, and then Control Panel.

  2. In Control Panel, select 32bit ODBC (Windows 95) or ODBC (Windows NT).

  3. Select the User DSN or System DSN tab. User DSN lets you create user-specific data-source names and System DSN lets you create data-sources available to all users.

  4. Click Add to display a list of locally installed ODBC drivers.

  5. Select the driver corresponding to the type of indexed sequential access method (ISAM) or database you want to connect to and click Finish.

  6. Follow the instructions specific to the driver. After closing, the DSN is now available for use.

When generating a DSN for some ODBC driver types, you need to know the location of the actual file. For example when creating an Access DSN, you need to know the location of the .mdb file. Also, you should have a valid username and password. For example, the system username for most Access systems is admin.

When creating an Oracle DSN, you should know the SQL*Net connection string.

Back to Creating Database Connections.