Using Adaptive Server Enterprise

About this chapter

This section describes how to use the Adaptive Server Enterprise database interfaces in PowerBuilder.

Supported versions for Adaptive Server

You can access Adaptive Server versions 15.x, and 16.x using the SYC Adaptive Server database interface. Use of this interface to access other Open Server programs is not supported. The SYC database interface uses a DLL named PBSYC.dll to access the database through the Open Client CT-Lib API.

You can also access Adaptive Server version 15.x/16.x using the ASE Adaptive Server database interface. Use of this interface to access other Open Server programs is not supported. The Adaptive Server database interface uses a DLL named PBASE.dll to access the database through the Open Client CT-Lib API. To use this interface, the Adaptive Server 15/16 client must be installed on the client computer. The ASE interface supports large identifiers with up to 128 characters.

Client Library API

The Adaptive Server database interfaces use the Open Client CT-Library (CT-Lib) application programming interface (API) to access the database.

When you connect to an Adaptive Server database, PowerBuilder makes the required calls to the API. Therefore, you do not need to know anything about CT-Lib to use the database interface.

Supported Adaptive Server datatypes

The Adaptive Server interface supports the SAP datatypes listed in the following table in DataWindow objects and embedded SQL.

Binary

NVarChar

BigInt (15.x and later)

Real

Bit

SmallDateTime

Char (see Column-length limits)

SmallInt

DateTime

SmallMoney

Decimal

Text

Double precision

Timestamp

Float

TinyInt

Identity

UniChar

Image

UniText (15.x and later)

Int

UniVarChar

Money

VarBinary

NChar

VarChar

Numeric

 


In Adaptive Server 15.0 and later, PowerBuilder supports unsigned as well as signed bigint, int, and smallint datatypes. You can also use the following datatypes as identity columns in Adaptive Server 15.0 and later: bigint, int, numeric, smallint, tinyint, unsigned bigint, unsigned int, and unsigned smallint.

Accessing Unicode data

PowerBuilder can connect, save, and retrieve data in both ANSI/DBCS and Unicode databases. When character data or command text is sent to the database, PowerBuilder sends a DBCS string if the UTF8 database parameter is set to 0 (the default). If UTF8 is set to 1, PowerBuilder sends a UTF-8 string. The database server must be configured correctly to accept UTF-8 strings. See the description of the UTF8 database parameter in the section called “UTF8” in Connection Reference.

The character set used by an Adaptive Server database server applies to all databases on that server. The nchar and nvarchar datatypes can store UTF-8 data if the server character set is UTF-8. The Unicode datatypes unichar and univarchar were introduced in Adaptive Server 12.5 to support Unicode data. Columns with these datatypes can store only Unicode data. Any data saved into such a column must be converted to Unicode explicitly. This conversion must be handled by the database server or client.

In Adaptive Server 12.5.1 and later, additional support for Unicode data has been added. For more information, see the documentation for your version of Adaptive Server.

Different display values in painters

The unichar and univarchar datatypes support UTF-16 encoding, therefore each unichar or univarchar character requires two bytes of storage. The following example creates a table with one unichar column holding 10 Unicode characters:

create table unitbl (unicol unichar(10))

In the Database painter, the column displays as unichar(20)because the column requires 20 bytes of storage. This is consistent with the way the column displays in SAP Central.

However, the mapping between the Type in the Column Specifications view in the DataWindow painter and the column datatype of a table in the database is not one-to-one. The Type in the Column Specifications view shows the DataWindow column datatype and DataWindow column length. The column length is the number of characters, therefore an Adaptive Server unichar(20)column displays as char(10) in the Column Specifications view.

Column-length limits

Adaptive Server 12.5 and earlier have a column-length limit of 255 bytes. Adaptive Server 12.5.x and later support wider columns for Char, VarChar, Binary, and VarBinary datatypes, depending on the logical page size and the locking scheme used by the server.

In PowerBuilder, you can use these wider columns for Char and VarChar datatypes with Adaptive Server 12.5.x when the following conditions apply:

  • The Release database parameter is set to 12.5 or higher.

  • You are accessing the database using Open Client 12.5.x or later.

The database must be configured to use a larger page size to take full advantage of the widest limits.

For more information about the Release database parameter, see "Release database parameter".

When you retrieve or update columns, PowerBuilder converts data appropriately between the Adaptive Server datatype and the PowerScript datatype. Similarly or identically named Adaptive Server and PowerScript datatypes do not necessarily have the same definitions. For information about the definitions of PowerScript datatypes, see the PowerScript Reference.

Conversion in PowerBuilder scripts

A double that has no fractional component is converted to a string with one decimal place if the converted string would cause Adaptive Server to have an overflow error when parsing the string. For example: the double value 12345678901234 would cause an overflow error, so PowerBuilder converts the double to the string value 12345678901234.0.

Basic software components for Adaptive Server

You must install the software components in the following figure to access an Adaptive Server database in PowerBuilder.

Figure: Components of an Adaptive Server Enterprise connection

Preparing to use the Adaptive Server database

Before you define the interface and connect to an Adaptive Server database in PowerBuilder, follow these steps to prepare the database for use:

  1. Install and configure the required database server, network, and client software.

  2. Install the Adaptive Server database interface.

  3. Verify that you can connect to Adaptive Server outside PowerBuilder.

  4. Install the required PowerBuilder stored procedures in the sybsystemprocs database.

Preparing an Adaptive Server database for use with PowerBuilder involves these four basic tasks.

Step 1: Install and configure the database server

You must install and configure the database server, network, and client software for Adaptive Server.

To install and configure the database server, network, and client software:

  1. Make sure the Adaptive Server database software is installed on the server specified in your database profile.

    You must obtain the database server software from SAP.

    For installation instructions, see your Adaptive Server documentation.

  2. Make sure the supported network software (for example, TCP/IP) is installed and running on your computer and is properly configured so that you can connect to the database server at your site.

    You must install the network communication driver that supports the network protocol and operating system platform you are using. The driver is installed as part of the Net-Library client software.

    For installation and configuration instructions, see your network or database administrator.

  3. Install the required Open Client CT-Library (CT-Lib) software on each client computer on which PowerBuilder is installed.

    You must obtain the Open Client software from SAP. Make sure the version of Open Client you install supports all of the following:

    The operating system running on the client computer

    The version of Adaptive Server that you want to access

    The version of PowerBuilder that you are running

    Required client software versions

    To use the ASE Adaptive Server interface, you must install Open Client version 15.x or later. To use the SYC Adaptive Server interface, you must install Open Client version 11.x or later.

  4. Make sure the Open Client software is properly configured so that you can connect to the database at your site.

    Installing the Open Client software places the SQL.INI configuration file in the Adaptive Server directory on your computer.

    SQL.INI provides information that Adaptive Server needs to find and connect to the database server at your site. You can enter and modify information in SQL.INI by using the configuration utility that comes with the Open Client software.

    For information about setting up the SQL.INI or other required configuration file, see your Adaptive Server documentation.

  5. If required by your operating system, make sure the directory containing the Open Client software is in your system path.

  6. Make sure only one copy of each of the following files is installed on your client computer:

    • Adaptive Server interface DLL

    • Network communication DLL (for example, NLWNSCK.DLL for Windows Sockets-compliant TCP/IP)

    • Database vendor DLL (for example, LIBCT.DLL)

Step 2: Install the database interface

If you install PowerBuilder using the PowerBuilder Installer (an online setup program), the Adaptive Server Enterprise (ASE or SYC) database interface is automatically installed. If you install PowerBuilder using the downloaded installation package (an offline setup program), select Native Database Interfaces | Adaptive Server Enterprise (ASE or SYC) database interface from the list of components.

Step 3: Verify the connection

Make sure you can connect to the Adaptive Server database server and log in to the database you want to access from outside PowerBuilder.

Some possible ways to verify the connection are by running the following tools:

  • Accessing the database server

    Tools such as the Open Client/Open Server Configuration utility (or any Ping utility) check whether you can reach the database server from your computer.

  • Accessing the database

    Tools such as ISQL (interactive SQL utility) check whether you can log in to the database and perform database operations. It is a good idea to specify the same connection parameters you plan to use in your PowerBuilder database profile to access the database.

Step 4: Install the PowerBuilder stored procedures

PowerBuilder requires you to install certain stored procedures in the sybsystemprocs database before you connect to an Adaptive Server database for the first time. PowerBuilder uses these stored procedures to get information about tables and columns from the DBMS system catalog.

Run the SQL script or scripts required to install the PowerBuilder stored procedures in the sybsystemprocs database.

For instructions, see Installing stored procedures in Adaptive Server databases.

Defining the Adaptive Server database interface

To define a connection through the Adaptive Server interface, you must create a database profile by supplying values for at least the basic connection parameters in the Database Profile Setup - Adaptive Server Enterprise dialog box. You can then select this profile anytime to connect to your database in the development environment.

For information on how to define a database profile, see Using database profiles.

Using Open Client security services

The Adaptive Server interfaces provide several DBParm parameters that support Open Client 11.1.x or later network-based security services in your application. If you are using the required database, security, and PowerBuilder software, you can build applications that take advantage of Open Client security services.

What are Open Client security services?

Open Client 11.1.x or later security services allow you to use a supported third-party security mechanism (such as CyberSafe Kerberos) to provide login authentication and per-packet security for your application. Login authentication establishes a secure connection, and per-packet security protects the data you transmit across the network.

Requirements for using Open Client security services

For you to use Open Client security services in your application, all of the following must be true:

  • You are accessing an Adaptive Server database server using Open Client Client-Library (CT-Lib) 11.1.x or later software.

  • You have the required network security mechanism and driver.

    You have the required SAP-supported network security mechanism and SAP-supplied security driver properly installed and configured for your environment. Depending on your operating system platform, examples of supported security mechanisms include: Distributed Computing Environment (DCE) security servers and clients, CyberSafe Kerberos, and Windows NT LAN Manager Security Services Provider Interface (SSPI).

    For information about the third-party security mechanisms and operating system platforms that Appeon has tested with Open Client security services, see the Open Client documentation.

  • You can access the secure server outside PowerBuilder.

    You must be able to access a secure Adaptive Server server using Open Client 11.1.x or later software from outside PowerBuilder.

    To verify the connection, use a tool such as ISQL or SQL Advantage to make sure you can connect to the server and log in to the database with the same connection parameters and security options you plan to use in your PowerBuilder application.

  • You are using a PowerBuilder database interface.

    You are using the ASE or SYC Adaptive Server interface to access the database.

  • The Release DBParm parameter is set to the appropriate value for your database.

    You have set the Release DBParm parameter to 11 or higher to specify that your application should use the appropriate version of the Open Client CT-Lib software.

    For instructions, see Release in the section called “Release” in Connection Reference.

  • Your security mechanism and driver support the requested service.

    The security mechanism and driver you are using must support the service requested by the DBParm parameter.

Security services DBParm parameters

If you have met the requirements described in Requirements for using Open Client security services, you can set the security services DBParm parameters in the Database Profile Setup dialog box for your connection or in a PowerBuilder application script.

There are two types of DBParm parameters that you can set to support Open Client security services: login authentication and per-packet security.

Login authentication DBParms

The following login authentication DBParm parameters correspond to Open Client 11.1.x or later connection properties that allow an application to establish a secure connection.

Sec_Channel_Bind
Sec_Cred_Timeout
Sec_Delegation
Sec_Keytab_File
Sec_Mechanism
Sec_Mutual_Auth
Sec_Network_Auth
Sec_Server_Principal
Sec_Sess_Timeout

For instructions on setting these DBParm parameters, see their descriptions in Database Parameters in Connection Reference.

Per-packet security DBParms

The following per-packet security DBParm parameters correspond to Open Client 11.1.x or later connection properties that protect each packet of data transmitted across a network. Using per-packet security services might create extra overhead for communications between the client and server.

Sec_Confidential
Sec_Data_Integrity
Sec_Data_Origin
Sec_Replay_Detection
Sec_Seq_Detection

For instructions on setting these DBParm parameters, see their descriptions in Database Parameters in Connection Reference.

Using Open Client directory services

The Adaptive Server interfaces provide several DBParm parameters that support Open Client 11.1.x or later network-based directory services in your application. If you are using the required database, directory services, and PowerBuilder software, you can build applications that take advantage of Open Client directory services.

What are Open Client directory services?

Open Client 11.1.x or later directory services allow you to use a supported third-party directory services product (such as the Windows Registry) as your directory service provider. Directory services provide centralized control and administration of the network entities (such as users, servers, and printers) in your environment.

Requirements for using Open Client directory services

For you to use Open Client directory services in your application, all of the following must be true:

  • You are accessing an Adaptive Server database server using Open Client Client-Library (CT-Lib) 11.x or later software

  • You have the required SAP-supported directory service provider software and SAP-supplied directory driver properly installed and configured for your environment. Depending on your operating system platform, examples of supported security mechanisms include the Windows Registry and Distributed Computing Environment Cell Directory Services (DCE/CDS).

    For information about the directory service providers and operating system platforms that Appeon has tested with Open Client directory services, see the Open Client documentation.

  • You must be able to access a secure Adaptive Server server using Open Client 11.1.x or later software from outside PowerBuilder.

    To verify the connection, use a tool such as ISQL or SQL Advantage to make sure you can connect to the server and log in to the database with the same connection parameters and directory service options you plan to use in your PowerBuilder application.

  • You are using the ASE or SYC Adaptive Server interface to access the database.

  • You must use the correct syntax as required by your directory service provider when specifying the server name in a database profile or PowerBuilder application script. Different providers require different syntax based on their format for specifying directory entry names.

    For information and examples for different directory service providers, see Specifying the server name with Open Client directory services.

  • You have set the Release DBParm to 11 or higher to specify that your application should use the behavior of the appropriate version of the Open Client CT-Lib software.

    For instructions, see Release database parameter in the section called “Release” in Connection Reference.

  • The directory service provider and driver you are using must support the service requested by the DBParm.

Specifying the server name with Open Client directory services

When you are using Open Client directory services in a PowerBuilder application, you must use the syntax required by your directory service provider when specifying the server name in a database profile or PowerBuilder application script to access the database.

Different directory service providers require different syntax based on the format they use for specifying directory entry names. Directory entry names can be fully qualified or relative to the default (active) Directory Information Tree base (DIT base) specified in the Open Client/Server configuration utility.

The DIT base is the starting node for directory searches. Specifying a DITbase is analogous to setting a current working directory for UNIX or MS-DOS file systems. (You can specify a nondefault DIT base with the DS_DitBase DBParm. For information, see "DS_DitBase".)

Windows registry server name example

This example shows typical server name syntax if your directory service provider is the Windows registry.

Node name: SALES:software\sybase\server\SYS12
DIT base: SALES:software\sybase\server
Server name: SYS12

To specify the server name in a database profile:

  • Type the following in the Server box on the Connection tab in the Database Profile Setup dialog box. Do not start the server name with a backslash (\).

    SYS12

To specify the server name in a PowerBuilder application script:

  • Type the following. Do not start the server name with a backslash (\).

    SQLCA.ServerName = "SYS12"

    If you specify a value in the Server box in your database profile, this syntax displays on the Preview tab in the Database Profile Setup dialog box. You can copy the syntax from the Preview tab into your script.

DCE/CDS server name example

This example shows typical server name syntax if your directory service provider is Distributed Computing Environment Cell Directory Services (DCE/CDS).

Node name: /.../boston.sales/dataservers/sybase/SYS12
DIT base: /../boston.sales/dataservers
Server name: sybase/SYS12

To specify the server name in a database profile:

  • Type the following in the Server box on the Connection tab in the Database Profile Setup dialog box. Do not start the server name with a slash (/).

    sybase/SYS12

To specify the server name in a PowerBuilder application script:

  • Type the following. Do not start the server name with CN=.

    SQLCA.ServerName = "SYS12"

    If you specify a value in the Server box in your database profile, this syntax displays on the Preview tab in the Database Profile Setup dialog box. You can copy the syntax from the Preview tab into your script.

Directory services DBParm parameters

If you have met the requirements described in Requirements for using Open Client security services, you can set the directory services DBParms in a database profile for your connection or in a PowerBuilder application script.

The following DBParms correspond to Open Client 11.1.x or later directory services connection parameters:

DS_Alias
DS_Copy
DS_DitBase
DS_Failover
DS_Password (Open Client 12.5 or later)
DS_Principal
DS_Provider
DS_TimeLimit

For instructions on setting these DBParms, see their descriptions in Database Parameters in Connection Reference.

Using PRINT statements in Adaptive Server stored procedures

The ASE or SYC Adaptive Server database interface allows you to use PRINT statements in your stored procedures for debugging purposes.

This means, for example, that if you turn on Database Trace when accessing the database through the ASE or SYC interface, PRINT messages appear in the trace log but they do not return errors or cancel the rest of the stored procedure.

Creating a DataWindow object based on a cross-database join

The ability to create a DataWindow object based on a heterogeneous cross-database join is available through the use of Adaptive Server's Component Integration Services. Component Integration Services allow you to connect to multiple remote heterogeneous database servers and define multiple proxy tables that reference the tables residing on those servers.

For information on how to create proxy tables, see the Adaptive Server documentation.

Installing stored procedures in Adaptive Server databases

This section describes how to install PowerBuilder stored procedures in an Adaptive Server Enterprise database by running SQL scripts provided for this purpose.

Appeon recommends that you run these scripts outside PowerBuilder before connecting to an Adaptive Server database for the first time through the Adaptive Server (ASE or SYC DBMS identifier) native database interface. Although the database interface will work without the PowerBuilder stored procedures created by these scripts, the stored procedures are required for full functionality.

What are the PowerBuilder stored procedure scripts?

What you do

In order to work with an Adaptive Server database in PowerBuilder, you or your system administrator should install certain stored procedures in the database before you connect to Adaptive Server from PowerBuilder for the first time.

You must run the PowerBuilder stored procedure scripts only once per database server, and not before each PowerBuilder session. If you have already installed the PowerBuilder stored procedures in your Adaptive Server database before connecting in PowerBuilder on any supported platform, you need not install the stored procedures again before connecting in PowerBuilder on a different platform.

PowerBuilder stored procedures

A stored procedure is a group of precompiled and preoptimized SQL statements that performs some database operation. Stored procedures reside on the database server where they can be accessed as needed.

PowerBuilder uses these stored procedures to get information about tables and columns from the Adaptive Server system catalog. (The PowerBuilder stored procedures are different from the stored procedures you might create in your database.)

SQL scripts

PowerBuilder provides SQL script files for installing the required stored procedures in the sybsystemprocs database:

Script

Use for

PBSYC.SQL

Adaptive Server databases

PBSYC2.SQL

Adaptive Server databases to restrict the Select Tables list


Where to find the scripts

The stored procedure scripts are located in the Server directory on the PowerBuilder installation package. The Server directory contains server-side installation components that are not installed with PowerBuilder on your computer.

PBSYC.SQL script

What it does

The PBSYC.SQL script contains SQL code that overwrites stored procedures that correspond to the same version of PowerBuilder in the Adaptive Server sybsystemprocs database and then re-creates them.

The PBSYC.SQL script uses the sybsystemprocs database to hold the PowerBuilder stored procedures. This database is created when you install Adaptive Server.

When to run it

Before you connect to an Adaptive Server database in PowerBuilder for the first time using the ASE or SYC DBMS identifier, you or your database administrator must run the PBSYC.SQL script once per database server into the sybsystemprocs database.

Run PBSYC.SQL if the server at your site will be accessed by anyone using the PowerBuilder or by deployment machines.

If you or your database administrator have already run the current version of PBSYC.SQL to install PowerBuilder stored procedures in the sybsystemprocs database on your server, you need not rerun the script to install the stored procedures again.

For instructions on running PBSYC.SQL, see How to run the scripts.

Stored procedures it creates

The PBSYC.SQL script creates the following PowerBuilder stored procedures in the Adaptive Server sybsystemprocs database. The procedures are listed in the order in which the script creates them.

PBSYC.SQL stored procedure

What it does

sp_pb190column

Lists the columns in a table.

sp_pb190pkcheck

Determines whether a table has a primary key.

sp_pb190fktable

Lists the tables that reference the current table.

sp_pb190procdesc

Retrieves a description of the argument list for a specified stored procedure.

sp_pb190proclist

Lists available stored procedures and extended stored procedures.

If the SystemProcs DBParm parameter is set to 1 or Yes (the default), sp_pb190proclist displays both system stored procedures and user-defined stored procedures. If SystemProcs is set to 0 or No, sp_pb190proclist displays only user-defined stored procedures.

sp_pb190text

Retrieves the text of a stored procedure from the SYSCOMMENTS table.

sp_pb190table

Retrieves information about all tables in a database, including those for which the current user has no permissions.

PBSYC.SQL contains the default version of sp_pb190table. If you want to replace the default version of sp_pb190table with a version that restricts the table list to those tables for which the user has SELECT permission, you can run the PBSYC2.SQL script, described in PBSYC2.SQL script.

sp_pb190index

Retrieves information about all indexes for a specified table.


PBSYC2.SQL script

What it does

The PBSYC2.SQL script contains SQL code that drops and re-creates one PowerBuilder stored procedure in the Adaptive Server sybsystemprocs database: a replacement version of sp_pb190table.

The default version of sp_pb190table is installed by the PBSYC.SQL script. PowerBuilder uses the sp_pb190table procedure to build a list of all tables in the database, including those for which the current user has no permissions. This list displays in the Select Tables dialog box in PowerBuilder.

For security reasons, you or your database administrator might want to restrict the table list to display only those tables for which a user has permissions. To do this, you can run the PBSYC2.SQL script after you run PBSYC.SQL. PBSYC2.SQL replaces the default version of sp_pb190table with a new version that displays a restricted table list including only tables and views:

  • Owned by the current user

  • For which the current user has SELECT authority

  • For which the current user's group has SELECT authority

  • For which SELECT authority was granted to PUBLIC

When to run it

If you are accessing an Adaptive Server database using the ASE or SYC DBMS identifier in PowerBuilder, you must first run PBSYC.SQL once per database server to install the required PowerBuilder stored procedures in the sybsystemprocs database.

After you run PBSYC.SQL, you can optionally run PBSYC2.SQL if you want to replace sp_pb190table with a version that restricts the table list to those tables for which the user has SELECT permission.

If you do not want to restrict the table list, there is no need to run PBSYC2.SQL.

For instructions on running PBSYC2.SQL, see How to run the scripts.

Stored procedure it creates

The PBSYC2.SQL script creates the following PowerBuilder stored procedure in the Adaptive Server sybsystemprocs database:

PBSYC2.SQL stored procedure

What it does

sp_pb190table

Retrieves information about those tables in the database for which the current user has SELECT permission.

This version of sp_pb190table replaces the default version of sp_pb190table installed by the PBSYC.SQL script.


How to run the scripts

You can use the ISQL or SQL Advantage tools to run the stored procedure scripts outside PowerBuilder.

Using ISQL to run the stored procedure scripts

ISQL is an interactive SQL utility that comes with the Open Client software on the Windows platforms. If you have ISQL installed, use the following procedure to run the PowerBuilder stored procedure scripts.

For complete instructions on using ISQL, see your Open Client documentation.

To use ISQL to run the PowerBuilder stored procedure scripts:

  1. Connect to the sybsystemprocs Adaptive Server database as the system administrator.

  2. Open one of the following files containing the PowerBuilder stored procedure script you want to run:

    PBSYC.SQL

    PBSYC2.SQL

  3. Issue the appropriate ISQL command to run the SQL script with the user ID, server name, and (optionally) password you specify. Make sure you specify uppercase and lowercase exactly as shown:

    isql /U sa /S SERVERNAME /i pathname /P { password }

    Parameter

    Description

    sa

    The user ID for the system administrator. Do not change this user ID.

    SERVERNAME

    The name of the computer running the Adaptive Server database.

    pathname

    The drive and directory containing the SQL script you want to run.

    password

    (Optional) The password for the sa (system administrator) user ID. The default Adaptive Server installation creates the sa user ID without a password. If you changed the password for sa during the installation, replace password with your new password.


    For example, if you are using PowerBuilder and are accessing the stored procedure scripts from d:\server, type either of the following:

    isql /U sa /S TESTDB /i d:\server\pbsyb.sql /P
    isql /U sa /S SALES /i d:\server\pbsyc.sql /P adminpwd
Using SQL Advantage to run the stored procedure scripts

SQL Advantage is an interactive SQL utility that comes with the Open Client software on the Windows platform. If you have SQL Advantage installed, use the following procedure to run the PowerBuilder stored procedure scripts.

For complete instructions on using SQL Advantage, see your Open Client documentation.

To use SQL Advantage to run the PowerBuilder stored procedure scripts:

  1. Start the SQL Advantage utility.

  2. Open a connection to the sybsystemprocs Adaptive Server database as the system administrator.

  3. Open one of the following files containing the PowerBuilder stored procedure script you want to run:

    PBSYC.SQL

    PBSYC2.SQL

  4. Delete the use sybsystemprocs command and the go command at the beginning of each script.

    SQL Advantage requires that you issue the use sybsystemprocs command by itself, with no other SQL commands following it. When you open a connection to the sybsystemprocs database in step 2, you are in effect issuing the use sybsystemprocs command. This command should not be issued again as part of the stored procedure script.

    Therefore, to successfully install the stored procedures, you must delete the lines shown in the following table rom the beginning of the PowerBuilder stored procedure script before executing the script.

    Before executing this script

    Delete these lines

    PBSYC.SQL

    use sybsystemprocs

    go

    PBSYC2.SQL

    use sybsystemprocs

    go


  5. Execute all of the statements in the SQL script.

  6. Exit the SQL Advantage session.