IsVariableLength Property (SQL-DMO)

The IsVariableLength property specifies data length representation handling for a data type.

Applies To
SystemDatatype Object UserDefinedDatatype Object

Syntax

object.IsVariableLength

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

Remarks

When True, the data type represents strings that vary in length, such as those defined as varchar(4).

When False, the data type does not represent strings that vary in length, such as those defined as char(4).

Variability in string representation is easily visible in client software. For example, the string AK retrieved from a column defined as varchar(4) is returned to a client as two characters. When retrieved from a column defined as char(4), the string is padded using a space character so that four characters are returned.

Data Type

Boolean

Modifiable

Read-only

Prototype (C/C++)

HRESULT GetIsVariableLength(LPBOOL pRetVal);

  


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