Creates an SProcCall object, which is a stored procedure call context. This is an object that is used to configure a call to a stored procedure. Once configured, you'd use system.db.execSProcCall to call the stored procedure. The call context object then holds any results from the stored procedure. The SProcCall object has the following functions used for registering parameters:
SPRocCall.registerInParam(index OR name, typeCode, value)
SPRocCall.registerOutParam(index OR name, typeCode)
These functions are used to register any in/out parameters for the stored procedure. Parameters can be referenced by index (starting at 1, not 0), or by name. To register an in/out parameter, you simply register it twice - once as an input parameter with the value you'd like to pass to the stored procedure, and once as an output parameter. N.B. not all JDBC drivers support named procedure parameters. If your function returns a value, you must use registerReturnParam to specify the datatype of the returned value. Note that this is different from stored procedures that return a result set, which doesn't require any setup on the SProcCall object. Some database systems call stored procedures that return a value "functions" instead of "procedures". For all of these functions, you'll need to specify a type code. These are codes defined by the JDBC specification. For your convenience, the codes exist as constants in the system.db namespace. Each type code will be mapped to a database-specific type by the JDBC driver. Not all type codes will be recognized by all JDBC drivers. The following type code constants are available for use in createSProcCall:
Once the call context has been executed, you can retrieve the result set, return value, and output parameter values (if applicable) by calling the following functions:
The following type code constants are available for other uses, but are not supported by createSProcCall:
SProcCall.getResultSet() - returns a dataset that is the resulting data of the stored procedure, if any.
SProcCall.getUpdateCount() - returns the number of rows modified by the stored procedure, or -1 if not applicable.
SProcCall.getReturnValue() - returns the return value, if registerReturnParam had been called.
SProcCall.getOutParamValue(index OR name) - returns the value of the previously registered out-parameter.