How PocketBuilder accesses the data source

When you access an ODBC data source in the PocketBuilder development environment, there are several initialization files and registry entries on your computer that work with the ODBC interface and driver to make the connection.

PKODB20 initialization file

The PKODB20 initialization file maintains access to extended functionality in the back-end DBMS, for which ODBC does not provide an API call. Examples of extended functionality are SQL syntax or DBMS-specific function calls.

In most cases, you do not need to edit the PKODB20 initialization file. In certain situations, however, you may need to add functions to the PKODB20 initialization file for your DBMS.

For instructions, see “The PKODB20 initialization file”.

ODBCINST registry entries

The ODBCINST initialization information is located in the HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI registry key. When you install an ODBC-compliant driver, ODBCINST.INI is automatically updated with a description of the driver.

This description includes:

You do not need to edit the registry key directly to modify connection information.The key is automatically updated when you install the driver.

ODBC registry entries

ODBC initialization information is located in the HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI registry key. When you define a data source, the driver writes the values you specify in the ODBC setup dialog box to the ODBC.INI registry key.

The ODBC.INI key contains subkeys named for each defined data source. Each subkey contains the values specified for that data source in the ODBC setup dialog box. The values include the following:

Do not edit the ODBC subkey directly to modify connection information. Instead, use a tool designed to define ODBC data sources and the ODBC configuration automatically, such as the ODBC Data Source Administrator.

Database profiles registry entry

Database profiles for all data sources are stored in the registry in HKEY_CURRENT_USER\SOFTWARE\Sybase\PocketBuilder\2.0\ DatabaseProfiles.

You should not need to edit the profiles directly to modify connection information. These files are updated automatically when PocketBuilder creates the database profile as part of the ODBC data source definition.

You can also edit the profile in the Database Profile Setup dialog box or complete the Database Preferences dialog box in PocketBuilder to specify other connection parameters stored in the registry. (For instructions, see Chapter 18, “Setting Additional Connection Parameters.”)

The following example shows a portion of a database profile for the SQLAny Demo data source:

DBMS=ODBC
Database=SQL Anywhere Demo DB
UserId=dba
DatabasePassword=
LogPassword=
ServerName=
LogId=
Lock=
DbParm=ConnectString='DSN=SQLAny Demo;UID=dba;PWD=sql'
Prompt=0

This registry entry example shows the two most important values in a database profile for an ODBC data source: