Available in:
Apps (win)
Apps (char)
Reportwriter
RPC
Standalone PL
X
X
X
X
X
int exec_proc(statement[[,variable-name,data,flags]...]) string statement, variable-name expr data, flags
If exec_proc() isn't part of the expression, the function escapes to the window trigger error trap or, for reports or stand-alone TRIMpl, the operating system command shell. Not all databases support stored procedures. Furthermore, only Oracle accepts array parameters. If you pass arrays to a database that does not support them, the database returns an error.
statement | specifies the procedure to execute. Multiple
statements can exist.
|
variable-name | (optional) specifies the name of a given argument.
|
data | (optional) must be a TRIMpl variable if the argument is
an output variable.
|
flags | (optional) indicates whether the variable is an
input and/or an output variable. flags possible values
are:
and are defined in header files (trim.h or gui.h). |
{ int i,j,k; for (i=4,j=4;i;i--) { exec_proc("begin :arg0 := sample6.add_func(:arg1, :arg2); end;", ":arg0",k,2,":arg1",i,1,":arg2",j,3); printf("i: " ^^ i ^^ ", j: " ^^ j ^^ ", k: " ^^ k); } }