%SSC_EXECIO

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, dbcursor, [ncount], [numvars][, type, var, arg][, ...])

Return value

value

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)

Arguments

dbchannel

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

dbcursor

The logical cursor number within the range from 1 through the maximum number specified by maxcur in the %SSC_INIT call. The cursor must have been opened by %SSC_OPEN. (n)

ncount

(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)

numvars

(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)

type

(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)

SSQL_INPUT

Input

SSQL_OUTPUT

Output

SSQL_INOUT

Input and output

SSQL_OUTDATE

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

SSQL_EXBINARY

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

var

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

arg

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

Discussion

%SSC_EXECIO executes stored procedures that use input/output parameters. It does not set cursor properties and 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:

Examples

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