class Parameter
Topic group Related topics Example
A parameter for a stored procedure.
Syntax
These objects are created automatically by the stored procedure.
Properties
The following table lists the properties of the Parameter class. (No events or methods are associated with this class.) For details on each property, click on the property below.
Property |
Default |
Description |
PARAMETER |
Identifies the object as an instance of the Parameter class | |
(PARAMETER) |
Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName | |
Input |
The parameter type | |
|
The value of the parameter |
Description
Parameter objects represent parameters to stored procedures. Each element of the params array of a StoredProc object is a Parameter object. The Parameter objects are automatically created when the procedureName property is set, either by getting the parameter names for that stored procedure from the SQL server or by using parameter names specified directly in the procedureName property.
A parameter may be one of four types, as indicated by its type property:
Input: an input value for the stored procedure. The value must be set before the stored procedure is called.
Output: an output value from the stored procedure. The value must be set to the correct data type before the stored procedure is called; any dummy value may be used. Calling the stored procedure sets the value property to the output value.
InputOutput: both input and output. The value must be set before the stored procedure is called. Calling the stored procedure updates the value property with the output value.
Result: the result value of the stored procedure. In this case, the stored procedure acts like a function, returning a single result value, instead of updating parameters that are passed to it. Otherwise, the value is treated like an output value. The name of the Result parameter is always "Result".
A Parameter object may be assigned as the dataLink of a component in a form. Changes to the component are reflected in the value property of the Parameter object, and updates to the value property of the Parameter object are displayed in the component.