MaximumChar Property (SQL-DMO)

The MaximumChar property returns the maximum number of characters used when a value of the data type is converted to a character string.

Applies To

SystemDatatype Object

Syntax

object.MaximumChar

Part Description
object Expression that evaluates to an object in the Applies To list

Remarks

Characters such as string terminators are not included in the character count.

The MaximumChar property returns a character count, not the number of bytes required to store a string of that length. The MaximumLength property can return the number of bytes required to store a value for a data type.

For example, for the SystemDatatype object referencing the nchar data type, MaximumChar returns 4,000. The MaximumLength property for the object returns 8,000, as each nchar character requires two bytes for storage.

Data Type

Long

Modifiable

Read-only

Prototype (C/C++)

HRESULT GetMaximumChar(LPLONG pRetVal);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.