StaticBind

Description

Specifies whether PocketBuilder gets a result set description to validate the SELECT statement against the database server before retrieving the data.

Applies to

Syntax

StaticBind = value

Parameter

Description

value

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

  • 0 Get a result set description before retrieving data. You can also specify 'No' to set this value.

  • 1 Skip getting a result set description before retrieving data. You can also specify 'Yes' to set this value.

Default

StaticBind = 1 (ODBC), StaticBind=0 (UltraLite)

Usage

ODBC Before it retrieves data from a database into a DataWindow object, PocketBuilder does not get a result set description to validate the SELECT statement against the database server. This default behavior generally speeds up the retrieval, 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 PocketBuilder get a description of the result set before retrieving data, set the StaticBind DBParm parameter to 0 or No.

UltraLite There is currently no advantage to setting StaticBind to 1 for UltraLite connections, therefore it is set to 0 and disabled in this release.

Validation When StaticBind is set to 1 (the default), PocketBuilder assumes that the result set matches the column format of the DataWindow object into which it is being retrieved. If a mismatch occurs, PocketBuilder displays an error.

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

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

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

Examples

Example 1

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