skip to main content
Using the Driver : Using the Database Configuration File
  

Try DataDirect Drivers Now

Using the Database Configuration File

You can configure an embedded database and data mapping using a database configuration file in XML format. Some of these values you can set in the file are the same as those you can set using the Config Options connection option (see "Connection Option Descriptions"). Some database configuration values can be set only using a configuration file.
The name of the database configuration file has the format:
databasename.config
where:
databasename
is the name of the database to be configured. For example, if your environment has a database named mydb or a database configuration file named mydb.config, when the driver establishes a connection, it performs the following tasks:
*Checks to see if an embedded database named mydb exists (or a database using the default databasename if one is not specified). If mydb exists, the driver connects to the remote data source using the mydb database.
*If mydb does not exist and the driver is configured to create a database, the driver looks for a database configuration file named mydb.config. If the database configuration file exists, the driver creates the database and mapping using the properties specified in the database configuration file.
*If mydb.config does not exist, the driver generates a database configuration file with default settings and uses those settings to create the database and its mapping.

Example Database Configuration File

The following is an example database configuration file:
<?xml version='1.0' encoding='UTF-8'?>
<Database xmlns="http//datadirect.com/cloud/config/1.0">
  <User name="CONNECT2" defaultSchema="RIGHTNOW">
    <UseSchema name="RIGHTNOW"/>
    <UseSchema name="PUBLIC"/>
  </User>
  <Schema name="RIGHTNOW" type="Rightnow">
    <ConfigOptions>uppercaseidentifiers=true;localtables=0;auditcolumns=none;
    </ConfigOptions>
<SessionOptions>loginurl=myservicecloudsite.com;userid=
     connect2@progress.com</SessionOptions>
  </Schema>
  <Schema name="PUBLIC" type="local">
  </Schema>
</Database>
The following are descriptions of the elements of the database configuration file.
In this section: 
* Database
* User
* UseSchema
* Schema
* ConfigOptions
* SessionOptions