Skip to content

SQLGetArgument - cSQLStatement

Get a stored procedure argument.

Type: Function
Return Data Type: String

Parameters

Parameter Type Description
iArgnum Integer Argument number

Syntax

Function SQLGetArgument Integer iArgnum Returns String

Call Example

Get SQLGetArgument iArgnum to StringVariable

Description

Get an argument from a stored procedure or stored function. This message is intended to retrieve the out or in/out arguments for a stored procedure or stored function. If the argument you are trying to get 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 returned as an empty string.

The out arguments will be returned as a result set. Check your database documentation to see when the result set is returned. Some backends return arguments as the first result set, others as the last result set. Microsoft SQL Server 7.0, for example, returns the arguments as the last result set. See SQLNextResultSet for information on how to switch to another result set.

Return Value

The out arguments will be returned as a result set. If the argument you are trying to get 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 returned as an empty string.