Skip to content

SQLSetNextArgument - cSQLStatement

Sets up a stored procedure argument so it can be passed and keeps track of the next argument number

Type: Procedure

Parameters

Parameter Type Description
sArgument String Argument value

Syntax

Procedure SQLSetNextArgument String sArgument

Call Example

Send SQLSetNextArgument sArgument

Description

Sets up an argument to pass to a stored procedure or stored function and keeps track of the next argument number. This message is intended to setup the in or in/out arguments for a stored procedure or stored function. Before you can call this message you must call SQLSetProcedureName.

If the argument you are trying to set does not exist, i.e. it was not reported by the backend as an argument, no error will be generated and the argument will be ignored.

Sample

Send SQLSetProcedurename of hstmt "sp_setapprole"
Send SQLSetNextArgument of hstmt "myapprole"
Send SQLSetNextArgument of hstmt "secret"
Send SQLSetNextArgument of hstmt "none"

The counter will be set to zero via SQLSetProcedureName.