SetDynamicParm
PowerScript function
Description
Specifies a value for an input parameter in the
DynamicDescriptionArea that is used in an SQL OPEN or EXECUTE
statement.
Only for Format 4 dynamic SQL
Use this function only in conjunction with Format 4 dynamic SQL
statements.
Syntax
|
1 |
DynamicDescriptionArea.SetDynamicParm ( index, value ) |
|
Argument |
Description |
|---|---|
|
DynamicDescriptionArea |
The name of the DynamicDescriptionArea, usually |
|
index |
An integer identifying the input parameter descriptor in |
|
value |
The value you want to use to fill the input parameter |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, SetDynamicParm returns null.
Usage
SetDynamicParm specifies a value for the parameter identified by
index in the array of input parameter descriptors in
DynamicDescriptionArea.
Use SetDynamicParm to fill the parameters in the input parameter
descriptor array in the DynamicDescriptionArea before executing an OPEN or
EXECUTE statement.
Examples
This statement fills the first input parameter descriptor in SQLDA
with the string MA:
|
1 |
SQLDA.SetDynamicParm(1, "MA") |
This statement fills the fourth input parameter descriptor in SQLDA
with the number 01742:
|
1 |
SQLDA.SetDynamicParm(4, "01742") |
This statement fills the third input parameter descriptor in SQLDA
with the date 12-31-2002:
|
1 |
SQLDA.SetDynamicParm(3, "12-31-2002") |
See also