ADO » Parameter » Direction

ParameterDirectionEnum = parameterobject.Direction
parameterobject.Direction = ParameterDirectionEnum

Sets or returns a ParameterDirectionEnum value that defines the type of the Parameterobject (input, output, input/output and return).

The Direction property is used to set or return a ParameterDirectionEnum constant that defines the direction of a Parameter object. By direction, we refer to how a Parameter is passed to or from a provider. This can be an input, output, input/output, or a returned value from a stored procedure.
You can also set the direction by using the CreateParameter method of the Command object. The default direction for this method is adParamInput.
ParameterDirectionEnum Constants
Note that Microsoft Access does not recognize output parameters or returned values.

Constant Value Description
adParamInput 1 Input parameter
adParamInputOutput 3 Both input and output parameter
adParamOutput 2 Output parameter
adParamReturnValue 4 Return value
adParamUnknown 0 Direction is unknown


Set objParameter = Server.CreateObject("ADODB.Parameter")

objParameter.Type = adInteger
objParameter.Size = 3
objParameter.Direction = adParamInput
objParameter.Value = intCount

objCommand.Parameters.Append objParameter

See Also: