%SSC_REBIND

Rebind host variables for a new query

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
value = %SSC_REBIND(dbchannel, dbcursor)

value

This function returns SSQL_NORMAL (success) or SSQL_FAILURE (failure). (i)

dbchannel

An internal database channel previously initialized using %SSC_INIT and connected by %SSC_CONNECT. (n)

dbcursor

The ID number for a database cursor. This must be within the range from 1 through the maximum number specified by themaxcur argument for %SSC_INIT. The cursor must have been opened by %SSC_OPEN. (n)

%SSC_REBIND resubmits the SELECT statement for a SELECT cursor (SSQL_SELECT) and updates bind variables for the statement. It does not update defined variables. In addition, %SSC_REBIND does not resubmit statements linked to a SELECT cursor (by using %SSC_SQLLINK). If there is an intervening %SSC_SQLLINK call between the %SSC_OPEN that creates the SELECT cursor and the %SSC_REBIND, the %SSC_REBIND call will resubmit the SELECT statement defined in the %SSC_OPEN call.

Because %SSC_REBIND does not reprocess defined variables, it is more efficient when resubmitting a SELECT statement than using another %SSC_OPEN call, which would reparse the entire statement.

For an example of rebinding host variables, see exam_fetch_update.dbl, which is in the connect\synsqlx subdirectory of the main Synergy/DE installation directory.