Skip to content

SQLSetArgument - cSQLStatement

Sets up a stored procedure argument so it can be passed

Type: Procedure

Parameters

Parameter Type Description
iArgnum Integer Argument number
sArgument String Argument value

Syntax

Procedure SQLSetArgument Integer iArgnum String sArgument

Call Example

Send SQLSetArgument iArgnum sArgument

Description

Sets up an argument to pass to a stored procedure or stored function. 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_HELP"
Send SQLSetArgument Of hstmt 1 "VENDOR"

Sample

Send SQLSetProcedurename of hstmt "sp_setapprole"
Send SQLSetArgument of hstmt 1 "myapprole"
Send SQLSetArgument of hstmt 2 "secret"
Send SQLSetArgument of hstmt 3 "none"