Size Property

The maximum size, in bytes, of the data within the column.

Syntax

int Size

Access

Read-write

Implements

IDbDataParameter.Size

Usage

  • The value of this property is the maximum size, in bytes, of the data within the column. The default value is inferred from the parameter value.

  • The Size property is used for binary and string types.

  • For variable length datatypes, the Size property describes the maximum amount of data to transmit to the server. For example, the Size property can be used to limit the amount of data sent to the server for a string value to the first 100 bytes.

  • If not explicitly set, the size is inferred from the actual size of the specified parameter value. For fixed width datatypes, the value of Size is ignored. It can be retrieved for informational purposes, and returns the maximum amount of bytes Adaptive Server ADO.NET Data Provider uses when transmitting the value of the parameter to the server.