SQLparam
Purpose
Synopsis
function SQLparam(i:integer):SQLparameter
function SQLparam(r:real):SQLparameter
function SQLparam(s:string):SQLparameter
Arguments
|
i
|
The initial value as an integer
|
|
r
|
The initial value as a real
|
|
s
|
The initial value as a string
|
Return value
SQL parameter suitable for SQL routines.
Example
The following calls a procedure named
myproc using 3 parameters. The first one is an input string parameter (
'hello'), the second is an input/output integer parameter (
10) and the last one is an output string parameter. The procedure returns a result set that mmodbc will use to initialise
result. After execution of the query, the new values of the 2 input/output parameters set by the procedure may be displayed using the appropriate SQLgetparam routines.
SQLexecute("CALL myproc(?,?,?)",
['hello',SQLparam(10),SQLparam("")],result)
writeln("P1=",SQLgetiparam(1))
writeln("P2=",SQLgetsparam(2))
Further information
1. This routine can only be used in a list of parameters for an SQL query: it defines an input/output parameter. The input value of the parameter is provided via the argument function (an integer, a real or a string) and the output value (set by the database during the execution of the query) can be retrieved using one of the SQLgetparam functions.
2. SQL parameters are typed: the type of the parameter is deduced from its initial values (passed to the
SQLparam function).
Related topics
Module
© 2001-2023 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation ("FICO"). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
