Use the PUT_PARAM() function to place a parameter on the bulletin board. If the parameter already exists, the new value overwrites the previous one.
With solidDB® Intelligent Transaction, SQL statements or procedures of a transaction can communicate with each other by passing parameters to each other using a parameter bulletin board. The bulletin board is a storage of parameters that is visible to all statements of a transaction.
The PUT_PARAM() function can be used in both the master and replicas for setting parameters to the parameter bulletin board of the current transaction.
Parameters are specific to a catalog. Different replica and master catalogs have their own set of bulletin board parameters that are not visible to each other.
These parameters are not propagated to the master. You can use the SAVE PROPERTY statement to propagate properties from the replica to the master. For details, read SAVE PROPERTY.
Because PUT_PARAM() is an SQL function, it can be used only within a procedure or in an SQL statement.
Both the parameter name and value are of type VARCHAR.
Differences between "PUT_PARAM()" and "SAVE PROPERTY property_name VALUE property_value;"
You typically use PUT_PARAM() inside the (running) transaction to pass parameters between procedures. These parameter values disappear from the bulletin board when the transaction terminates (commits or rolls back).
You typically use the SAVE PROPERTY statement in the replica to set properties for the entire transaction. These properties can be used in the WHERE clause of the PROPAGATE TRANSACTIONS statement. When the transaction is executed in the master, the properties of the transaction are put to the parameter bulletin board of the transaction in the beginning of the transaction. Hence, they can be accessed by all procedures of the transaction by using the GET_PARAM(param_name) function.
Return values
Error Code
Description
13086
Invalid data type in a parameter.
When executed successfully, PUT_PARAM() returns the new value of the assigned parameter.