MaxSize 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 MaxSize property returns the greatest length of a data type in bytes, or the precision of the type.
Syntaxe
object.MaxSize
Parts
- object
Expression that evaluates to an object in the Applies To list
Data Type
Long
Modifiable
Read-only
Prototype (C/C++)
HRESULT GetMaxSize(LPLONG pRetVal);
Notes
For binary and character data types, the MaxSize property returns the greatest number of bytes required to store a string of the type. For example, a user-defined data type defined as varchar(22) requires 22 bytes. The number of characters contained in the string is determined by the mix of single and multibyte characters within it.
For the fixed-precision, numeric data types, the MaxSize property returns the maximum precision of the type.
For all other referenced data types, the MaxSize property returns the number of bytes required to store a value of the type in a Microsoft SQL Server structure representing the type.