Contents|Index|Previous|Next

Administration Program

An administration program, the ODBC Administrator, is shipped with the ODBC SDK and can be redistributed by users of the ODBC SDK. In addition, developers can write their own administration program. Generally, developers write their own administration program only if they want to retain complete control over data source configuration, or if they are configuring data sources directly from their application, which is acting as an administration program. For example, a spreadsheet program might allow users to add and then use data sources at run time.

The administration program first loads the installer DLL. It then calls functions in the installer DLL to perform the following tasks:

odbc00090000.gif Add, modify, or delete data sources interactively. The administration program can call SQLManageDataSources, SQLCreateDataSource, or SQLConfigDataSource.

SQLManageDataSources displays a dialog box with which the user can add, modify, or delete data sources and specify tracing options; this is the function that is called when the installer DLL is invoked directly from the Control Panel. SQLCreateDataSource displays a dialog box with which the user can only add data sources. SQLConfigDataSource passes the call directly to the driver setup DLL.

In all cases, the installer DLL calls ConfigDSN in the driver setup DLL to actually add, modify, or delete the data source. The driver setup DLL may prompt the user for additional information.

odbc00090000.gif Add, modify, or delete data sources silently. The administration program calls SQLConfigDataSource in the installer DLL and passes it a null window handle, the name of a data source to add, modify, or delete, and a list of values for the registry. The installer DLL calls ConfigDSN in the driver setup DLL to actually add, modify, or delete the data source.

odbc00090000.gif Add, modify, or delete a default data source. The default data source is the same as any other data source, except that its name is Default. It is added, modified, or deleted in the same fashion as any other data source.