Synopsis
ParameterDirection pd
= Parameter.Direction;
Parameter.Direction = pd
;
Specifies whether the parameter is input-only, output-only,
bidirectional, or a return value. You set the
Direction
property using a value from the
ParameterDirection
enumeration, as shown in Table 20-2.
Table 20-2. ParameterDirection values
Value
|
Description
|
Input
|
The parameter value is submitted to the parameterized command or
stored procedure.
|
Output
|
The parameter value is returned from the parameterized command or
stored procedure.
|
InputOutput
|
The parameter can send information to a stored procedure and
parameterized command and retrieve the new value if it is modified.
|
ReturnValue
|
The parameter represents a return value from a stored procedure or
built-in function.
|
Note
If a value isn’t returned for an output parameter or
return value, the Value
of the corresponding
Parameter
is null
. With the OLE
DB provider, make sure you add a parameter for the return value (if
needed) before other parameters.