Navigation:  DAO Object Classes > DaoDbEngine Class >

DaoDbEngine:RegisterDatabase() Method

Previous pageReturn to chapter overviewNext page


Enters connection information for an ODBC data source



cDatabaseA string that is the name used in the OpenDatabase method. It refers to a block of descriptive information about the data source. For example, if the data source is an ODBC remote database, it could be the name of the server
cDriverA string that is the name of the ODBC driver. This isn't the name of the ODBC driver DLL file. For example, SQL Server is a driver name, but SQLSRVR.DLL is the name of a DLL file. You must have ODBC and the appropriate driver already installed
lSilentA logical value: TRUE Doesn't display the ODBC driver dialog boxes that prompt for driver-specific information. The next parameter, Attributes, must contain all the necessary driver-specific information or the dialog boxes are displayed anyway
cAttributesA string that is a list of keywords to be added to the Windows registry. The keywords are in a carriage-return-delimited string






If the database is already registered (connection information is already entered) in the Windows Registry when you use the RegisterDatabase method, the connection information is updated.


If the RegisterDatabase method fails for any reason, no changes are made to the Windows Registry, and an error occurs.


For more information about ODBC drivers such as SQL Server, see the documentation provided with the driver.


You should use the ODBC Data Sources dialog box in the Control Panel to add new data sources, or to make changes to existing entries. However, if you use the RegisterDatabase method, you should set the lSilent option to True.



DaoDbEngineThe DBEngine object contains and controls all other collections and objects in the DAO object hierarchy



DbEngine sample