Partager via


Length Property

Cette fonctionnalité sera supprimée dans une prochaine version de Microsoft SQL Server. Évitez d'utiliser cette fonctionnalité dans de nouveaux travaux de développement, et prévoyez de modifier les applications qui utilisent actuellement cette fonctionnalité.

The Length property specifies the maximum number of characters or bytes accepted by the referenced column or user-defined data type.

Syntaxe

object
.Length [=value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list
  • value
    A long integer greater than or equal to 1

Data Type

Long

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetLength(LPLONG pRetVal);
HRESULT SetLength(LONG pRetVal);

Notes

For SQL Distributed Management Objects (SQL-DMO) objects referencing columns and user-defined data types defined on character data types, such as char and nchar, interpret the Length property as a number of characters. For objects referencing columns and user-defined data types defined on binary data types, such as varbinary, interpret the Length property as a number of bytes.

Applies To:

Column Object

UserDefinedDatatype Object