Name
Parameter.Size Property — (Versions 2.0, 2.1, 2.5, 2.6)
Synopsis
parameter.Size = sizeThe 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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access