Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ADO Parameter Object

The ADO Parameter Object represents a parameter or argument associated with a Command object based on a parameterized query or stored procedure.

ADO Parameter Object Collections

ADO Properties Collection

All the Property objects for a specific instance of a Parameter object. This collection is not currently supported on UNIX.

ADO Parameter Object Methods

ADO Parameter Object AppendChunk Method

Appends data to a large text or binary data parameter.

ADO Parameter Object Properties

ADO Parameter Object Attributes Property

One or more characteristics of a parameter. This property is currently read-only on UNIX.

ADO Parameter Object Direction Property

Indicates if the parameter is an input parameter, an output parameter, or both; or if the parameter is the output of a stored procedure.

ADO Parameter Object Name Property

The name of the parameter.

ADO Parameter Object NumericScale Property

The scale of numeric values in the parameter.

ADO Parameter Object Precision Property

The degree of precision for numeric values in the parameter.

ADO Parameter Object Size Property

The maximum size, in bytes or characters, of a parameter.

ADO Parameter Object Type Property

The data type of the parameter.

ADO Parameter Object Value Property

The value assigned to the parameter.

ADO Parameter Object Remarks

The Properties collection is not currently supported on UNIX.

Many providers support parameterized commands. These are commands where the desired action is defined once, but variables (or parameters) are used to alter some details of the command. For example, an SQL SELECT statement could use a parameter to define the matching criteria of a WHERE clause, and another to define the column name for a SORT BY clause.

The Parameter objects represent parameters associated with parameterized queries, or the in/out arguments and the return values of stored procedures. Depending on the functionality of the provider, some collections, methods, or properties of a Parameter object may not be available.

The collections, methods, and properties of a Parameter object are used to:

   set or return the name of a parameter with the ADO Parameter Object Name Property.

   set or return the value of a parameter with the ADO Parameter Object Value Property.

   set or return parameter characteristics with the ADO Parameter Object Attributes Property, ADO Parameter Object Direction Property, ADO Parameter Object Precision Property, ADO Parameter Object NumericScale Property, ADO Parameter Object Size Property, and ADO Parameter Object Type Property properties.

   pass long binary or character data to a parameter with the ADO Parameter Object AppendChunk Method.

If you know the names and properties of the parameters associated with the stored procedure or parameterized query you wish to call, you can use the CreateParameter method to create Parameter objects with the appropriate property settings and use the ADO Collections Append Method to add them to the ADO Parameters Collection. This lets you set and return parameter values without having to call the ADO Collections Refresh Method on the Parameters collection to retrieve the parameter information from the provider, a potentially resource-intensive operation.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.