Runoob Tutorial ArchiveEnglish

ADO Parameter Object

ADO Parameter Object


Parameter Object

The ADO Parameter Object can provide 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, which uses this collection to pass parameters into 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 execution. For example, an SQL SELECT statement can use a parameter to define the matching condition of the WHERE clause, and another parameter to define the column name of 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

Property

Property Description
Attributes Sets or returns a property 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 Parameter object's value.
Precision Sets or returns the maximum number of digits allowed when representing a parameter's value.
Size Sets or returns the maximum size of the 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.

Method

Method Description
AppendChunk Append a long binary or character data to a Parameter object.
Delete Remove an object from the Parameters collection.