Making the data source available
Your users need access to the DBMS and to the database your
application uses.
You need to:
- If necessary,
install the DBMS runtime files in the application directory or in
a directory on the system path.
Follow the instructions and licensing rules specified by the
vendor. - Make sure each user has access to the database the
application uses.
If your application uses a local database, install the database
and any associated files, such as a log file, on the user’s
computer.If your application uses a server database, make sure the
user’s computer is set up to access the database. This
may be the task of a database administrator. - Install any native database interfaces your application
uses on the user’s computer. - If your application uses the ODBC interface, configure
the ODBC database drivers and data sources, as described in “Configuring an ODBC
driver”.
Installing native database interfaces
You need to install the database interface drivers your application
requires, such as the ODBC interface and other native database interfaces.
The files for the native database interfaces your application
uses belong in the same directory as the application or in a directory
on the system path. When you install PowerBuilder, these files are
installed in the SharedPowerBuilder directory. The first
two characters of the filename are PB, the next three characters
identify the database, and the last two identify the version of PowerBuilder.
For example, PBOR870.DLL is the Oracle Version 8 database interface
and PBSYC70.DLL is the Sybase CT-LIB database interface.
Installing ODBC and system files
If your application uses ODBC drivers, each user’s
machine needs three types of files:
- PowerBuilder ODBC
interface and driver syntax files Install PBODB70
.DLL and PBODB70
.INI
in the application directory or a directory on the system path.
The INI and DLL files must be in the same directory. If you have
modified the PBODB70 initialization file, make sure you deploy the
modified version.
For information about adding sections or functions to the
PBODB70 initialization file, see Connecting to Your Database
. - Microsoft ODBC driver and DLLs The Microsoft ODBC Driver Manager (ODBC32.DLL) and supporting
files are usually already installed in the user’s Windows
system directory. - ODBC database drivers and supporting
files Sybase provides ODBC database drivers for Adaptive Server Anywhere as well
as INTERSOLV drivers for several databases. If you deploy an application
that uses an INTERSOLV driver, you should deploy the DLL and HLP
files for the specific DBMS as well as the following required files
(more recent files may have been provided with the current release
so that the number shown in the filenames may be different):- PBBAS13.DLL
- PBFLT13.DLL
- PBUTL13.DLL
- PBDRV13.CNT
- PBDRV13.HLP
- PBTRN13.DLL
- IVPB.LIC
Configuring an ODBCdriver
To use an ODBC data source in your application, the ODBC configuration must
include:
- An entry for the DBMS
driver in ODBCINST.INI - An entry for the data source in ODBC.INI with instructions
on how to start the database
Drivers in ODBCINST.INI
The registry entry for ODBCINST.INI is in this location:
1 |
HKEY_LOCAL_MACHINESoftwareODBC |
ODBCINST.INI lists the ODBC drivers installed on the machine
and the driver and setup DLLs for each driver.
If you copy the ODBC interface files to a user’s
computer, you must modify the ODBCINST.INI registry entry. The following
examples show typical registry entries:
Key | Name and Value |
---|---|
ODBC Drivers |
Adaptive Server Anywhere 6.0 Installed PB INTERSOLV OEM 3.11 32-BIT DB2 Installed |
Adaptive Server Anywhere 6.0 |
Driver C:Program FilesSybaseAdaptive Setup C:Program FilesSybaseAdaptive |
PB INTERSOLV OEM 3.11 32-BIT DB2 |
Driver C:Program Filessybaseshared Setup C:Program Filessybaseshared |
Data sources in ODBC.INI
To allow the user to connect to a particular data source,
you must provide a definition for that data source in the registry
in this location:
1 |
HKEY_CURRENT_USERSoftwareODBCODBC.INI |
The data source must be listed in the section [ODBC
Data Sources] with its associated DBMS and there must be
a section whose name is the data source. The data source section
specifies the connection parameters for the data source. The following
examples show typical registry entries:
Key | Name and Value |
---|---|
ODBC Data Sources |
MyAppDB Adaptive Server Anywhere 6.0 |
MyAppDB |
Start C:Program FilesSybaseAdaptive Driver C:Program FilesSybaseAdaptive DatabaseName MyAppDB DatabaseFile C:PRODDIRMyAppDB.DB |
You might use one of the following ways to make the modifications
to ODBC.INI:
- Use Microsoft’s
ODBC Administrator control panel, if the control panel is available
on the user’s system. - Use Microsoft’s ODBC API. This API allows
you to modify the ODBC files by calling functions from within your
application. The ODBC API ensures that the modifications are made
correctly and that there is no conflicting information. - Use a software distribution application that includes
ODBC configuration instructions to do your installation. - Look at your own ODBC.INI registry key that you
have used during development and copy the relevant portions to the
user’s ODBC.INI. This ad hoc method is not recommended,
because there are no protections against incorrect modifications
.
When you copy a section, make sure you modify paths to correspond
with the user’s setup.
For more information about the contents of
the registry entries for ODBC drivers and data sources, see Connecting
to Your Database
.
Database profiles Connecting to Your Database
includes
information about database profiles. Profiles, which are defined
in PB.INI, provide the information necessary to connect to data
sources from the development
environment. Your
users do not need database profiles.
Deploying the Adaptive Server Anywhere runtimesystem
If your PowerBuilder application uses an Adaptive Server Anywhere database, you
need to deploy the Adaptive Server Anywhere DBMS as well as Adaptive Server Anywhere’s
ODBC database drivers. You can deploy the Adaptive Server Anywhere runtime system
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.
Restrictions Enterpise Application Studio includes Adaptive Server 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.
In addition to deploying the runtime system, you need to do
the following for your users:
- Make your application’s
data source available - Configure ODBC to access the data source
For more information about deploying Adaptive Server Anywhere databases and
applications, see the Adaptive Server Anywhere User’s Guide
.