setParam method: pass input values to SQL statements
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
The setParam method sets the value
of an SQL statement's parameter marker to the specified value (a
literal value, a procedure variable, or a procedure input parameter).
The setParam method takes two arguments. This
is the syntax for setParam:
Syntax
|
- marker_num
- Specifies the ordinal number of the parameter marker in the
SQL statement that is to receive the value as an integer.
1denotes the first parameter marker,2denotes the second, n denotes the nth. - value
- Specifies a literal, variable name, or input parameter that contains the value to be assigned to the parameter marker.
The following example shows a segment of a stored procedure that
uses setParam to assign values from two procedure
variables to the parameter markers in an SQL INSERT statement. When
the procedure executes, it substitutes the value of the cust_number procedure
variable for the first parameter marker and the value of the cust_name variable
for the second parameter marker.
|