Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
value = %SSC_REBIND(dbchannel, dbcursor)
This function returns SSQL_NORMAL (success) or SSQL_FAILURE (failure). (i)
An internal database channel previously initialized using %SSC_INIT and connected by %SSC_CONNECT. (n)
The logical cursor number within the range from 1 through the maximum number specified by maxcur during %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 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.