Using ODBC

Open DataBase Connectivity (ODBC) is a standard database access method that allows access and modification of data from any application, regardless of which database management system is handling the data.

An ODBC connection establishes a link between your database, the ODBC drivers, and your application, and works as follows:

You create a database using the database program of your choice. You then use the driver (corresponding to the application) to create a data source name (DSN). The DSN links a database file to a driver and provides a central location for accessing databases on a given computer. Once this is done, you can access the database with your application.

Note: You can use a DSN connection (in which case you must ensure that your data source name is unique), or you can use a DSN-less connection. You use a DSN-less connection by coding your ASP scripts to issue commands to your Access database directly. This bypasses the ODBC software on the server, and allows for faster connection and execution time on the database interaction.

There are three types of DSNs.

System DSN - System DSNs allow every application on that computer to access the data source, regardless of which user created the data source. All users on the system can see this DSN and use it (as long as they know the user name and password). The configuration for this DSN is stored in the registry. An ODBC System DSN allows you to store information about how to connect to an associated database.

User DSN - User DSNs are created for a specific user. Only the user who created the DSN can see this and use it. The configuration for this DSN is stored in the registry.

File DSN - File DSNs are similar to user DSNs, except for the fact that the configuration for this DSN is stored in a simple text file with a *.dsn extension.

WEBppliance supports only System DSNs because these are the only ones accessible to Microsoft Windows 2000 applications (such as IIS), and hence to remote servers.

While all drivers require that you provide the database location, some drivers require additional parameters. These are often specified by the database. For example, Microsoft Access DSNs must refer to database files on the local file system.

The ODBC Manager allows you to view, add, modify, and delete data sources. It offers three options as follows:

Related Topics


Opening the ODBC Manager

The ODBC Manager allows you to view, add, modify, and delete data sources.

To open the ODBC Manager follow these steps.


Viewing a list of data sources

An ODBC connection establishes a link between your database, the ODBC drivers, and your application. Once you create a database using the database program of your choice, use the driver (corresponding to the application) to create a data source name (DSN). The DSN links a database file to a driver and provides a central location for accessing databases on a given computer. Once this is done, you can access the database with your application.

To view a list of data sources follow this step.

The Data Source List form displays a list of data source names and related drivers. You can modify and delete any listed data source.


Adding Microsoft SQL Server data sources

A data source is used to connect to a database stored either on the local server or a remote server. The connection is established using an ODBC driver.

Important: The WEBppliance installation does not include Microsoft SQL Server. You have to install it separately either on the same server as WEBppliance or on a separate server. The SQL database name is the name of the database on this SQL Server. When providing the SQL server name, enter the WEBppliance server host name if SQL server is installed locally, or the remote server name if installed on a separate server. Ensure that it resolves to a valid IP address.

To add a Microsoft SQL Server data source follow these steps.


Adding Microsoft Access data sources

To add a Microsoft Access data source follow these steps.

If the Create New Database? check box is selected, this creates an empty Access database in the location specified by the file name. To create a data source for a specific domain, point the file name to a database in the domain's file system.


Modifying Microsoft SQL Server data sources

To modify a Microsoft SQL Server data source follow these steps.


Modifying Microsoft Access data sources

To modify a Microsoft Access data source follow these steps.


Deleting data sources

Note: When you delete a data source, you do not delete the database file it references. If you delete the data source by mistake, you can add it again specifying the same parameters, but without clicking the Create New Database? check box in the Add Data Source form. To create a new database with the same data source name, you must use a new file name, or delete the old database file manually.

To delete a data source follow these steps.