f2s_esql_get_proc_param¶
Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers
Syntax
f2s_esql_get_proc_param {parameterNumber OR parameterName} to {variable} [using {variant}]
Parameter |
Description |
---|---|
parameterNumber |
The position of the parameter (1 - iNUM) to return |
parameterName |
A string containing the name of the parameter |
variable |
Variable to hold the value of the parameter |
variant |
Optional variant type variable that will receive a statement interface |
Description
This command is used to get the value of a specific parameter associated with a stored procedure.
The optional “using” syntax allows you to pass around the interface created by this command. The variable passed MUST be a variant. This allows for multiple statements to be active concurrently in some cases. If you use the “using” syntax, it must be used on all subsequent commands. Mixing the using syntax is not supported. So for instance, if you plan on having multiple statements active concurrently, all active statements must make use of the using syntax.
Examples
- SQL Server Code to create a simple Stored Procedure ‘dbo.TEST’ that takes a ‘DATETIME’ input and adds 40 days to the ‘OUTPUT’ parameter
CREATE PROCEDURE TEST @dDateIN DATETIME, @dDateOUT DATETIME OUTPUT AS SELECT @dDateOUT = DATEADD(dd,40,@dDateIN)
- DataFlex code to call the SQL Server ‘TEST’ Stored Procedure under the ‘.dbo’ schema
DateTime dtCurrentDateTime DateTime dtOutputDateTime Move (CurrentDateTime()) to dtCurrentDateTime f2s_esql_set_proc_name "dbo.TEST" f2s_esql_prepare_stmt f2s_esql_set_proc_param "@dDateIN" to dtCurrentDateTime f2s_esql_execute_proc f2s_esql_get_proc_param "@dDateOUT" to dtOutputDateTime Showln dtOutputDateTime
Related Commands
Replaces: Command SQL_SET_PROCEDURE_PARAMETER