ADO Direction Property
Definition and Usage
The Direction property can be set or returned a ParameterDirectionEnum value, indicating whether the Parameter represents an input parameter, output parameter, both, or whether the parameter is a return value of the stored procedure. The default value is adParamInput.
The Direction property is read/write, allowing the user to set this information when using providers that do not return this information, or when they do not want ADO to make additional calls to the provider to retrieve parameter information.
Not all providers can determine the direction of parameters in their stored procedures. In this case, the Direction property must be set before executing the query.
Syntax
objparameter.Direction
Instance
<% set comm=Server.CreateObject("ADODB.Command") set para=Server.CreateObject("ADODB.Parameter") para.Type=adVarChar para.Size=25 para.Direction=adParamInput para.Value=varfname comm.Parameters.Append para %>
ParameterDirectionEnum Values
Constant | Value | Description |
---|---|---|
adParamUnknown | 0 | Indicates that the direction of the parameter is unknown. |
adParamInput | 1 | Default value. Indicates that the parameter is an input parameter. |
adParamInputOutput | 3 | Indicates that the parameter is both an input and output parameter. |
adParamOutput | 2 | Indicates that the parameter is an output parameter. |
adParamReturnValue | 4 | Indicates that the parameter is a return value. |