ODBC database drivers and supporting files

This section lists files that are required for all ODBC database connections from PowerBuilder or InfoMaker applications, as well as files required for a specific database interface or DBMS.

PowerBuilder ODBC interface files

The following PowerBuilder ODBC interface files are required if your application uses ODBC:

Table 41-7: PowerBuilder ODBC interface files

Name

Description

pbodb110.dll

PowerBuilder ODBC interface

pbodb110.ini

PowerBuilder ODBC initialization file

Installed path \Program Files\Sybase\Shared\PowerBuilder

Deployment path Same directory as the application, in a directory on the system path, or in the App Path registry key.

Registry entries See “App Path registry key”.

Notes The INI and DLL files must be in the same directory. If you have modified the pbodb110 initialization file, make sure you deploy the modified version.

Microsoft ODBC files

Table 41-8 lists the Microsoft ODBC files that are required if your application uses ODBC.

Table 41-8: Microsoft ODBC files

Name

Description

DS16GT.dll DS32GT.dll ODBC32.dll ODBC32GT.dll ODBCAD32.exe ODBCCP32.cpl ODBCCP32.dll ODBCCR32.dll ODBCINST.cnt ODBCINST.hlp ODBCINT.dll ODBCTRAC.dll

Microsoft ODBC driver manager, DLLs, and Help files

Installed path Windows system directory.

Deployment path Windows system directory.

Registry entries None.

Notes The Microsoft ODBC Driver Manager (ODBC32.dll) and supporting files are usually already installed in the user’s Windows system directory.

SQL Anywhere files

If your PowerBuilder application uses a SQL Anywhere database, you need to deploy the SQL Anywhere DBMS as well as SQL Anywhere’s ODBC database drivers.

NoteRestrictions PowerBuilder includes SQL Anywhere for use during the development process. However, this product cannot be deployed royalty-free to your users.

If your application requires the data definition language (DDL), a transaction log, stored procedures, or triggers, see your Sybase sales representative.

For more information about deploying SQL Anywhere databases and applications, see the SQL Anywhere documentation.

If your application uses a standalone database, you can deploy the SQL Anywhere Desktop Runtime System to users’ computers without incurring additional license fees. The runtime system allows the user to retrieve and modify data in the database, but does not allow modifications to the database schema. It does not support transaction logs, stored procedures, or triggers.

A full installation for the SQL Anywhere driver, runtime engine, and supporting files is available in the Support\SA10Runtime directory on the CD. Table 41-9 lists some of the files that are installed. For more information see the RuntimeEdition.html file in the installed directory.

Table 41-9: SQL Anywhere files

Name

Description

dbodbc10.dll

SQL Anywhere ODBC driver

dbbackup.exe

SQL Anywhere backup utility

dbcon10.dll

Connection dialog box, required if you do not provide your own dialog box and your end users are to create their own data sources, if they need to enter user IDs and passwords when connecting to the database, or if they need to display the Connection dialog box for any other purpose

dbisqlc.exe

Interactive SQL utility

dblgen10.dll

Language-specific string library (EN indicates the English version)

dblib10.dll

Interface library

dbtool10.dll

SQL Anywhere database tools

dbunlspt.exe

SQL Anywhere unload utility

dbvalid.exe

SQL Anywhere validation utility

rteng10.exe

Restricted runtime engine

dbctrs10.dll

Performance utility

dbserv10.dll

Server utility

Installed path \Program Files\Sybase\SQL Anywhere 10\win32

Deployment path Same directory as the application, in a directory on the system path, or in the App Path registry key.

Registry entries See “App Path registry key” and “Configuring ODBC data sources and drivers”.

Notes Supporting files should be installed in the same directory as dbodbc10.dll. If you are not using the English string library, make sure you deploy the appropriate version of the language-specific string library.

Configuring ODBC data sources and drivers

ODBC.INI To allow the user to connect to a particular data source, your installation program must provide a definition for that data source in the ODBC.INI key in the registry on the computer that accesses the data source, in HKEY_CURRENT_USER for a user DSN or in HKEY_LOCAL_MACHINE for a system DSN. The data source definition specifies the name and location of the database driver as well as the command required to start the database engine. The data source in the ODBC Data Sources key must also be listed in ODBC.INI.

The following shows typical registry entries for a data source called MyApp DB that uses SQL Anywhere. Registry keys are enclosed in square brackets and are followed by string values for that key in the format "Name"="Value":

[HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\MyApp DB]
"Driver"="C:\Program Files\Sybase\SQL Anywhere 10\
   win32\dbodbc10.dll"
"Start"="c:\program files\sybase\SQL Anywhere 10\win32\
   rteng10.exe -c9m"
"UID"="dba"
"PWD"="sql"
"Description"="Database for my application"
"DatabaseFile"="C:\Program Files\myapps\myapp.db"
"AutoStop"="Yes"


[HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\
   ODBC Data Sources]
"MyApp DB"="SQL Anywhere 10.0"

ODBCINST.INI Your installation program needs to make two types of entry in the ODBCINST.INI key in HKEY_LOCAL_MACHINE\SOFTWARE\ODBC for each driver that your deployed application uses:

If the ODBC database driver files are not located in a directory on the system path, you also need to add their location to the App Paths key for the executable file.

If you are using ODBC drivers obtained from a vendor, you can use the driver’s setup program to install the driver and create registry entries.

The following shows a typical registry entry for SQL Anywhere. A registry key is enclosed in square brackets and is followed by string values for the key in the format "Name"="Value":

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\
   SQL Anywhere 10.0]
"Driver"="c:\program files\sybase\SQL Anywhere 10\
   win32\dbodbc10.dll"
"Setup"="c:\program files\sybase\SQL Anywhere 10\
   win32\dbodbc10.dll"

For more information about the contents of the registry entries for ODBC drivers and data sources, see Connecting to Your Database.