ADO Direction Property
Definition and Usage
The Direction property can be set or return a ParameterDirectionEnum value indicating whether the Parameter represents an input parameter, an output parameter, both, or whether the parameter is a return value of a stored procedure. The default value is adParamInput.
The Direction property is read/write, allowing the user to set information for providers that do not return this information, or to set this information when ADO should not make additional calls to the provider to retrieve parameter information.
Not all providers can determine the parameter direction in their stored procedures. In this case, the Direction property must be set before the query is executed.
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
Σταθερά | Τιμή | Περιγραφή |
---|---|---|
adParamUnknown | 0 | Ενδείκνυε ότι η κατεύθυνση του παραμέτρου είναι άγνωστη. |
adParamInput | 1 | Προεπιλεγμένη τιμή. Ενδείκνυε ότι το παράμετρο είναι παράμετρος εισόδου. |
adParamInputOutput | 3 | Ενδείκνυε ότι το παράμετρο είναι παράμετρος εισόδου και εξόδου. |
adParamOutput | 2 | Ενδείκνυε ότι το παράμετρο είναι παράμετρος εξόδου. |
adParamReturnValue | 4 | Ενδείκνυε ότι το παράμετρο είναι αξία επιστροφής. |