ADO ParameterObject


Parameter Object

The ADO Parameter object provides information about a single parameter used in a stored procedure or query.

The Parameter object is added to the Parameters collection when it is created. The Parameters collection is associated with a specific Command object, and the Command object uses this collection to pass parameters in and out of stored procedures and queries.

Parameters are used to create parameterized commands. These commands (after they have been defined and stored) use parameters to change certain details of the command before it is executed. For example, a SQL SELECT statement can use a parameter to define the matching condition of the WHERE clause, and another parameter to define the name of the column in the SORT BY clause.

There are four types of parameters: input parameters, output parameters, input/output parameters, and return parameters.

Syntax

objectname.property objectname.method

Properties

Property Description
Attributes Sets or returns the attributes of a Parameter object.
Direction Sets or returns how a parameter is passed to or from a stored procedure.
Name Sets or returns the name of a Parameter object.
NumericScale Sets or returns the number of digits to the right of the decimal point for a numeric value of a Parameter object.
Precision Sets or returns the maximum number of digits allowed when representing a numeric value in a parameter.
Size Sets or returns the maximum size of a value in a Parameter object (in bytes or characters).
Type Sets or returns the type of a Parameter object.
Value Sets or returns the value of a Parameter object.

Methods

Method Description
AppendChunk Appends long binary or character data to a Parameter object.
Delete Deletes an object from the Parameters collection.
Other Extensions