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 36-7: PowerBuilder ODBC interface files

Name

Description

pbodb125.dll

PowerBuilder ODBC interface

pbodb125.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 PBODB125.INI file must be in a directory defined by the HKEY_CURRENT_USER\Software\Sybase\PowerBuilder\12.5\InitPath registry setting or, in the absence of that key, in the same directory as the DLL file. In most cases, the target deployment machine will not have the registry setting and, therefore, the INI file should be in the same directory as the DLL.

Microsoft ODBC files

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

Table 36-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.

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 PowerBuilder setup program.  Table 36-9 lists some of the files that are installed. For more information see the RuntimeEdition.html file in the installed SQL Anywhere directory. It contains a list of all the SQL Anywhere files that can be freely deployed with PowerBuilder applications to end users' computers.

Table 36-9: SQL Anywhere files

Name

Description

dbodbc11.dll

SQL Anywhere ODBC driver

dbbackup.exe

SQL Anywhere backup utility

dbcon11.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

dblgen11.dll

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

dblib11.dll

Interface library

dbtool11.dll

SQL Anywhere database tools

dbunlspt.exe

SQL Anywhere unload utility

dbvalid.exe

SQL Anywhere validation utility

rteng11.exe

Restricted runtime engine

rteng11.lic

License file for restricted runtime engine

dbctrs11.dll

Performance utility

dbserv11.dll

Server utility

Installed path \Program Files\Sybase\SQL Anywhere 12\bin32 or \bin64

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”.

Privilege requirements on Vista When running under User Account Control, the SQL Anywhere restricted runtime engine (rteng11.exe) and other SQL Anywhere executables require elevated privileges. For Windows Vista and later versions of Windows, you can use the SQL Anywhere elevated operations agent (dbelevate11.exe) to elevate the privileges of users running these executables and allow non-elevated client processes to autostart elevated servers or database engines. The following DLLs also require elevated privileges when they are registered and unregistered: dbcon11.dll, dbctrs11.dll, dbodbc11.dll, dboledb11.dll, and dboledba11.dll.

Notes Supporting files should be installed in the same directory as dbodbc11.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 12\
   bin32\dbodbc11.dll"
"Start"="c:\program files\sybase\SQL Anywhere 12\bin32\
   rteng11.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 12.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 12.0]
"Driver"="c:\program files\sybase\SQL Anywhere 12\
   bin32\dbodbc11.dll"
"Setup"="c:\program files\sybase\SQL Anywhere 12\
   bin32\dbodbc11.dll"

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