Execute a stored procedure with I/O parameters

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
value = %SSC_EXECIO(dbchannel, stcursor, [ncount], [numvars][, type, var, arg][, ...])


This function returns one of the following: the return result of a stored procedure, an error code returned by the database, SSQL_NORMAL (success), or SSQL_FAILURE (failure). (Negative values are considered an error.) (i)


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


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


(optional) The number of rows to execute. The default value is 1. Only certain databases (Oracle, SQL Server, and Sybase) support multirow operations. If this argument is used with a database that does not support multirow move, ncount must be set to 1. (n)


(optional) The number of host variables for sending to or receiving from the stored procedure. (The maxcol argument, as specified in %SSC_INIT, specifies the maximum value for numvars.) If you pass numvars, you must also include the type, var, and arg arguments. The number of times you include the type, var, arg series must equal the value of numvars. (n)


(optional) The type of the first host variable. (Required if numvars is passed.) If you pass SSQL_EXBINARY, you must also pass one of the other types and connect the two with a plus sign (+)—for example, SSQL_EXBINARY+SSQL_OUTPUT. (n)






Input and output


Output date field (to conform to pre-7.1 zoned conversion rules)


A binary column (instructs %SSC_EXECIO to leave the data as is; see the Discussion below)


(optional) The first host variable. (Required if numvars is passed.) (a, n, or String)


(optional) The name of the argument in the stored procedure. (Required if numvars is passed.) (a)

%SSC_EXECIO executes stored procedures that use input/output parameters. It does not does not accept a result set. For more information on using stored procedures with SQL Connection, see Running stored procedures from SQL Connection.

Note the following:

The Connectivity Series distribution includes example programs (in the connect\synsqlx directory) that use %SSC_EXECIO with stored procedures: