[PB] How to publish an independent POWERBUILDER application

Source: Internet
Author: User
Tags informix sybase

How to publish an independent POWERBUILDER application

Abstract: This article describes the drivers and related settings required to release an independent POWERBUILDER application, this section describes how to include SQL Anywhere, a local database product of Powersoft, as a data source, in the release.

I. Preface
PowerBuilder (PB) is a new-generation database application development tool launched by Powersoft, a subsidiary of SYBASE, rapid development and support for multiple platforms are welcomed by a wide range of programming technicians. With the application and use of petabytes of data, related materials are also available. In addition, PowerSoft continuously releases petabytes of updated versions to meet the development needs, PB, As a database development tool of the fourth generation language, occupies a considerable proportion in the development tool market.
In the process of using PB for development, many developers feel the inconvenience of PB during application release while enjoying the fast and powerful features: first, the execution file of PB after compilation cannot run independently. It must contain PB Runtime library files, database driver files, and network driver files. Secondly, when including these files, you must be very clear about the usage of each Runtime Library file and the dynamic link library file set of data drivers corresponding to different databases, however, this information is often very rare. Therefore, a very streamlined PB application is very bloated after packaging and publishing.
This article aims to describe how to release a local database application using Powersoft SQL Aaywhere database developed with PB6.0 under Windows95/98, and how to "lose weight" for PB applications ", in particular, it should be noted that how to streamline the SQL Anywhere Database and include it in the application, and how to configure its data source without installing SQL Aaywhere as the driver of the local database.
Generally, releasing a PB application contains the following files and related operations in addition to the application components:
1. PowerBuilder Runtime dynamic link Library (Runtime Library ).
2. Database interfaces: these include the database-specific interfaces or ODBC interfaces provided by PB, and ODBC database drivers provided by different database vendors.
3. Configure the ODBC data source.
4. If the C/S mode is used, it includes the Client of the database vendor, such as the Open Client of SYBASE and SQL * Net of ORALCLE.
In this article, we will focus on 1-3 items, as described below:
Ii. Dynamic Link Library (Runtime Library) during PowerBuilder running ).
The dynamic link library files required by PB of different versions are different, but the library names are similar. These DLL files must be included in the application directory or system directory, for 32-bit Windows applications, the Runtime Library must be PBVM60.DLL, which is optional for other components. For Windows applications with 16 bits, the Runtime Library must be PBVM60W. DLL. In short, compared with PB5.0 and earlier versions, PB6.0 reduces the number of runtime libraries, which also facilitates developers to package and release applications. Taking PB6.0 running on 32-bit Windows 95/98 as an example, the detailed explanation is shown in Table 1-1:

Serial number

File

Purpose Remarks
1 Pbvm60.dll PowerBuilder Virtual Machine Required
2 Pbdwe60.dll Datawindow data window Engine Optional
3 Pbrtc60.dll Rich Text control pipe, hypertext Control Optional
4

PBTRA60.DLL

DLL used for tracing dB CILS database access tracking Optional

Table 1-1

Iii. Database interfaces.
All database interface files and drivers must be stored in the application directory or system directory.
1. PB-specific database interface and ODBC database interface.
In Windows 95/98, users can include the following interface files when publishing applications based on their different databases, as shown in Table 2-1 below.

Serial number Database Interface file
1 Powersoft ODBC interface Pbodb60.dll, pbodb60.ini
2 Informix I-net 5 Pbin560.dll
3 Informix I-net 7 Pbin760.dll
4 Microsoft SQL Server 4.x DB-lib Pbsyb60.dll, pbdbl60.dll
5 Microsoft SQL Server 6.0 Pbmss60.dll
6 Oracle version 7.1 PBO7160.DLL
7 Oracle Version 7.2 PBO7260.DLL
8 Oracle Version 7.3 PBO7360.DLL
9 IBM databases PBIBM60W. DLL
10 Sybase Information CONNECT DB2 Gateway PBMDI60.DLL, PBDBL60.DLL
11 Sybase Net-Gateway for DB2 PBNET60.DLL, PBDBL60.DLL
12 Sybase SQL Server 4.x DB-Lib PBSYT60.DLL, PBDBT60.DLL
12 Sybase SQL Server 10.x and 11.x CT-Lib PBSYC60.DLL

Table 2-1

2. ODBC database drivers provided by third-party vendors.
If your database is driven by an ODBC database, the connection method of this database is more complex than that of a dedicated database interface, and the connection efficiency is lower than that of a dedicated database. Therefore, in addition to the Powersoft ODBC Inerface interface file mentioned above, PBODB60.DLL and PBODB60.INI files, ODBCINST must exist in the WINDOWS directory. INI and ODBC. INI file and Microsoft ODBC driver and related DLL. In addition, it must contain ODBC database drivers provided or supported by various database vendors. The drivers of some database vendors are listed below in Table 2-2:

Serial number Database Driver
1 Text PBTXT09.DLL, PBTXT09.HLP, PBTXT12.DLL, PBTXT12.HLP
2 DB2 PBDB209.DLL, PBDB209.DLL, PBDB212.DLL, PBDB212.DLL
3 Btrieve PBBTR09.DLL, WBTRCALL. DLL, PBBTR09.HLP, BBTR12.DLL, PBBTR12.HLP
4 DBASE PBDBF09.DLL, PBDBF09.HLP, PBDBF12.DLL, PBDBF12.HLP
5 Paradox 4/5 PBIDP09.DLL, PBBAS09.DLL, PBDBC09.DLL, PBFLT09.DLL, PBUTL09.DLL, PBIDP09.HLP, IVTRN09.DLL, IVPB. LIC
6 SQL Anywhere WOD50W. DLL, WL50EN. DLL, WODBC. HLP, WODBC. HLP WOD50T. DLL, WL50ENT. DLL, WTR50T. DLL, WODBC. HLP

Table 2-2

4. ODBC data source configuration.
After the preceding files are included, you must configure the ODBC data source for applications using ODBC databases so that the application can directly access the user data source after installation. The following describes the data source configuration principles and methods as it involves modifying the system registry, which can be implemented manually or set during the installation steps when creating an application installation disk. The configuration of the ODBC Data Source involves Microsoft ODBC drivers and related dynamic link libraries. This part can be mounted to the machine as part of the system when Windows 95/98 is installed, and "32 bit ODBC (32 bit ODBC)" can be found in "Control Panel) "data source Manager item and use it for operations.
The following uses the user database created using the SQL Anywhere Database as an example to describe how to use the data source Manager for manual configuration of ODBC and how to automatically modify the system registry in the installation program, for other databases, see SQL Anywhere. First, list the most streamlined files required by the SQL Anywhere Database. See table 3-1:

Serial number File Function Type
1 WOD50T. DLL SQL Anywhere ODBC driver ODBC driver
2 DBL50T. DLL Database Interface Dynamic Link Library Database Files
3 WL50ENT. DLL English string of the Database Interface  
4 WTR50T. DLL ODBC translation Dynamic Link Library  
5 WODBC. HLP Configure the ODBC Help File  
6 DBENG50.EXE Database Engine  

Table 3-1

1. Use the data source Manager to configure the user data source.
1.1. Install the SQL Anywhere Database driver to add a line of SQL Anywhere driver instructions to the "ODBC driver" page in the data source Manager.
1.2. on the "user DSN" Page, select "add", and then select the SQL Anywhere Data Source. After the Data Source configuration information table appears, set the Data Source Name ), add information such as Database File, User ID, and Password. Select OK, in the "user data source" window, the ODBC driver of the user's database is added. Select "OK" and exit the data source Manager.

After the preceding two steps, you can restart the system and use the SQL Anywhere Database after running the application.
2. Modify the INI file and the system registry to configure the user data source.
(Note: C: \ TestApp is the user application directory, C: \ TestApp \ Sqlany50 is the SQL Anywhere Database driver file directory included in the application, and TestDB. DB is the user database .)
1.1 modify the ODBCINST. ini file:
Add a line in [ODBC Drivers:
Sybase SQL Anywhere 5.0 = Installed
Add a section [Sybase SQL Anywhere 5.0] and add it to this section:
Setup = C: \ TestApp \ Sqlany50 \ WOD50W. DLL
Driver = C: \ TestApp \ Sqlany50 \ WOD50W. DLL
1.2 modify the ODBC. ini file:
Add a line in [ODBC Data Sources:
TestDB = Sybase SQL Anywhere 5.0
Add a section [TestDB] and add it to this section:
Driver = C: \ TestApp \ Sqlany50 \ WOD50W. DLL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.