StaticBind

Description

When you retrieve data from a database into a DataWindow object or report, PowerBuilder does not get a result set description to validate the SELECT statement against the database server before retrieving the data. This means the retrieval should be faster, especially when you are accessing the database over a network. (This feature is called describeless retrieval.)

If you want to override the default behavior and have PowerBuilder get a description of the result set before retrieving data, set the StaticBind parameter to 0 or No.

Applies to

Syntax

StaticBind=value

Parameter

Description

value

Specifies whether you want PowerBuilder to get a result set description before retrieving data from a database into a DataWindow object or report. Values are:

Default

StaticBind=1

Usage

Validation When StaticBind is set to 1 (the default), PowerBuilder does not validate the SELECT statement against the database server before retrieving data. It assumes that the result set matches the column format of the DataWindow object or report into which it is being retrieved. If a mismatch occurs, PowerBuilder displays an error.

Troubleshooting tips Problems can occur in your application if the result set description obtained by the DataWindow object or report is different from the current database description of the result set. This can occur for the following reasons:

To fix problems caused by conflicting result set descriptions, you can correct your DataWindow object or report definition by doing either of the following:

If your DataWindow object or report and DBMS result set descriptions do not match and you want to avoid errors, set StaticBind to 0 or No to specify that PowerBuilder should always get a result set description before retrieving data into a DataWindow object or report.

Examples

Example 1

To specify that you want PowerBuilder to get a result set description before retrieving data into a DataWindow object or report: