Compartilhar via


ColumnMaxLength Property

Esse recurso será removido em uma versão futura do Microsoft SQL Server. Evite usar esse recurso em desenvolvimentos novos e planeje modificar os aplicativos que atualmente o utilizam.

The ColumnMaxLength property exposes the maximum number of characters required to store the data of a column in the current result set of a QueryResults object.

Sintaxe

object.ColumnMaxLength(OrdinalColumn)

Parts

  • object
    An expression that evaluates to an object in the Applies To list.

  • OrdinalColumn
    A long integer that specifies the column in the results by position.

Data Type

String

Modifiable

Read-only

Prototype (C/C++)

HRESULT GetColumnMaxLength(long nColumn, LPLONG pRetVal);

Comentários

Interpret the value of the ColumnMaxLength property with respect to the data type of the column in the result set. Retrieve the data type using the ColumnType property.

ColumnType property

ColumnMaxLength

SQLDMO_DTypeBinary, SQLDMO_DTypeGUID, SQLDMO_DTypeImage, SQLDMO_DTypeNText, SQLDMO_DTypeText, or SQLDMO_DTypeVarBinary

A system-defined value. Use the GetColumnBinaryLength method to determine the length of a specified row value.

SQLDMO_DTypeBit, SQLDMO_DTypeFloat8, SQLDMO_DTypeInt1, SQLDMO_DTypeInt2, SQLDMO_DTypeInt4, SQLDMO_DTypeMoney, or SQLDMO_DTypeMoney4

The maximum precision of a value of the type.

SQLDMO_DTypeChar, SQLDMO_DTypeVarchar, SQLDMO_DTypeUChar, or SQLDMO_DTypeUVarchar

The count of bytes required to represent the data as a Unicode character string (two bytes per character). The count is incremented to include the count of bytes in a string terminator.

SQLDMO_DTypeDateTime or SQLDMO_DTypeDateTime4

A system-defined value.

Applies To: