StaticBind – PB Docs 126

StaticBind database parameter

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.

Controls

  • ADO.NET

  • ASE, SYC and SYJ SAP Adaptive Server Enterprise

  • DIR Sybase DirectConnect

  • JDB JDBC

  • ODBC

  • OLE DB

  • O90 Oracle9i

  • O10 Oracle 10g

  • ORA Oracle 11g

  • SNC SQL Native Client for Microsoft SQL Server

Syntax

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:

  • 0

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

  • 1

    (Default) Skip getting a result set description before retrieving
    data. You can also specify 'Yes' to
    set this value.

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:

  • The database definition changes
    after you build the DataWindow object or report.

  • You build the DataWindow object or report while connected
    to one DBMS and then run it against a different DBMS.

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

  • Export and edit your
    column definitions

  • Force a recompile of the SQL statement
    in the Database painter’s Interactive SQL (ISQL)
    view (see the Users Guide for instructions)

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

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

  • Database profile

    Clear the Static Bind check box on the Transaction page (or
    System page in the case of the OLE DB interface) in the Database Profile
    Setup dialog box.

  • Application

    To specify this statement in code, type the
    following:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x