Connection string keywords - Package properties

Use these IBM® i Access ODBC driver connection string keywords to change Package properties of the ODBC connection.

The following table lists connection string keywords for Package properties that are recognized by the IBM i Access ODBC driver:

Table 1. IBM i Access ODBC connection string keywords for the Package properties
Keyword Description Choices Default
DFTPKGLIB or DefaultPkgLibrary Specifies the library for the SQL package. This property has no effect unless the XDYNAMIC property is set to 1. Library for SQL package QGPL
PKG or DefaultPackage Specifies how the extended dynamic (package) support will behave. The string for this property must be in the following format: A/DEFAULT(IBM),x,0,y,z,0

The x, y, and z are special attributes that need to be replaced with how the package is to be used.

  • x = Specifies whether or not to add statements to an existing SQL package.
  • y = Specifies the action to take when SQL package errors occur. When a SQL package error occurs, the driver will return a return code based on the value of this property.
  • z = Specifies whether or not to cache SQL packages in memory. Caching SQL packages locally reduces the amount of communication to the server in some cases.
Note: This property has no effect unless the XDYNAMIC property is set to 1.
A/DEFAULT(IBM),x,0,y,z,0

Values for x option:

  • 1 = Use (Use the package, but do not put any more SQL statements into the package)
  • 2 = Use/Add (Use the package and add new SQL statements into the package)

Values for y option:

  • 0 = Return an error (SQL_ERROR) to the application
  • 1 = Return a warning (SQL_SUCCESS_WITH_INFO) to the application
  • 2 = Return success (SQL_SUCCESS) to the application

Values for z option:

  • 0 = Do not cache SQL package locally
  • 1 = Cache SQL package locally
default
XDYNAMIC or ExtendedDynamic Specifies whether to use extended dynamic (package) support.

Extended dynamic support provides a mechanism for caching dynamic SQL statements on the server. The first time a particular SQL statement is run, it is stored in a SQL package on the server. On subsequent runs of the same SQL statement, the server can skip a significant part of the processing by using information stored in the SQL package.

Note: For more information see Use Extended Dynamic SQL.
0 = Disable extended dynamic support

1 = Enable extended dynamic support

1
Note: A/DEFAULT(IBM),x,0,y,z,0 is the default value for PKG or DefaultPackage.