Name

Parameter.Size Property — (Versions 2.0, 2.1, 2.5, 2.6)

Synopsis

                     parameter.Size = size

The Size property returns the maximum size of a Parameter object’s value.

Datatype

Long

Description

The Size property returns the maximum size of a parameter’s value, in bytes. This property is both read- and write-enabled.

If a Parameter object is of variable length datatype, the Size property must be set before it is appended to the Parameters collection, or an error will be generated.

If you attempt to change the datatype of a Parameter object to a variable-length datatype, be sure to set the Size property first so that an error will not be generated.

You should also set the Size property of the Parameter object before calling the Execute method of the Command object, since if you don’t and a variable-length datatype exists, ADO may try to allocate memory based on the maximum amount needed, causing an error.

Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.