Share via


ColumnMaxLength Property

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

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.

구문

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);

주의

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:

QueryResults Object