ONE Active Server Pages Product Home Page Developer Site Version


ADO Parameter Object Size Property

The maximum size, in bytes or characters, of a Parameter object.

Size Property Return Values (ADO Parameter Object)

Sets or returns a Long value that indicates the maximum size in bytes or characters of a value in a Parameter object.

Size Property Remarks (ADO Parameter Object)

Use the Size property to determine the maximum size for values written to or read from the ADO Parameter Object Value Property of a Parameter object. The Size property is read/write. If you specify a variable-length data type for a Parameter object, you must set the object's Size property before appending it to the ADO Parameters Collection; otherwise an error occurs. If you have already appended the Parameter object to the Parameters collection of an ADO Command Object and you change its type to a variable-length data type, you must set the Parameter object's Size property before executing the Command object; otherwise an error occurs.

If you use the ADO Collections Refresh Method to obtain parameter information from the provider and it returns one or more variable-length data type Parameter objects, ADO may allocate memory for the parameters based on their maximum potential size, which could cause an error during execution. To prevent an error, you should explicitly set the Size property for these parameters before executing the command.

Size Property Example (ADO Parameter Object)

See ActiveConnection property example.