Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



ADO Command Object CreateParameter Method

Creates a new Parameter object with the specified properties.

CreateParameter Method Syntax (ADO Command Object)
Set parameter = command.CreateParameter (
 Name, Type, Direction, Size, Value)
CreateParameter Method Parameters (ADO Command Object)

parameter

The new ADO Parameter Object.

Name

An optional String representing the name of the Parameter object.

Type

An optional Long value specifying the data type of the Parameter object. See the ADO Parameter Object Type Property for valid settings.

Direction

An optional Long value specifying the type of Parameter object. See the ADO Parameter Object Direction Property for valid settings.

Size

An optional Long value specifying the maximum length for the parameter value in characters or bytes.

Value

An optional varValue specifying the value for the Parameter object.

CreateParameter Method Return Value (ADO Command Object)

Returns a Parameter object.

CreateParameter Method Remarks (ADO Command Object)

Use the CreateParameter method to create a new ADO Parameter Object with the specified name, type, direction, size, and value. Any values you pass in the arguments are written to the corresponding Parameter properties.

This method does not automatically append the Parameter object to the ADO Parameters Collection of a Command object. This lets you set additional properties whose values ADO will validate when you append the Parameter object to the collection.

If you specify a variable-length data type in the Type argument, you must either pass a Size argument or set the ADO Parameter Object Size Property of the Parameter object before appending it to the Parameters collection; otherwise, an error occurs.

CreateParameter Method Examples (ADO Command Object)

See the ADO Collections Append Method example.



ContentsPreviousNextIndex