This method is used with a variable of the PREPARED data type:
variable.SetParameters(value [, value...])
The variable must first be initialized using prepare(). setParameters() is used if the prepared statement contains any placeholders - it supplies values to substitute these placeholders.
This method accepts a number of arguments, their number, order and data types depending on the placeholders. The values are bound by reference, so any changes in the bound values will be reflected in the prepared statement.
You can call the setParameters() method for the PREPARED variable, if this variable is then used independently of any cursor. If you use this variable in the declare() method to associate the prepared statement with a cursor, you need to execute the setParameters() method for the CURSOR variable declared by this method and not for the PREPARED variable:
# Using it for the PREPARED variable
DEFINE prep_v PREPARED
...
CALL prep_v.Prepare("SELECT * FROM customers WHERE cust_id>?")
CALL prep_v.SetParameters(100)
...
# Using it for a CURSOR variable
DEFINE prep_v PREPARED,
cur_v CURSOR
CALL prep_v.Prepare("SELECT * FROM customers WHERE cust_id>?")
CALL cur_v.Declare(prep_v)
CALL cur_v.SetParameters(100)