86 references to MaxLength
System.Data (86)
fx\src\data\Microsoft\SqlServer\Server\MetadataUtilsSmi.cs (4)
165
return metaData.
MaxLength
== SmiMetaData.UnlimitedMaxLengthIndicator ||
489
source.
MaxLength
,
503
source.
MaxLength
,
574
firstMd.
MaxLength
== secondMd.MaxLength &&
fx\src\data\Microsoft\SqlServer\Server\SmiMetaData.cs (8)
136
DefaultChar_NoCollation.
MaxLength
,
150
DefaultNChar_NoCollation.
MaxLength
,
164
DefaultNText_NoCollation.
MaxLength
,
178
DefaultNVarChar_NoCollation.
MaxLength
,
192
DefaultText_NoCollation.
MaxLength
,
206
DefaultVarChar_NoCollation.
MaxLength
,
741
_maxLength = smdDflt.
MaxLength
;
786
MaxLength
,
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (26)
105
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
* sizeof(char), value.Length,
113
if ( (SmiMetaData.UnlimitedMaxLengthIndicator != metaData.
MaxLength
&&
134
CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, 0, fieldOffset, buffer.Length, bufferOffset, length );
145
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
* sizeof(char), actualLength,
149
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, actualLength, fieldOffset, buffer.Length, bufferOffset, length );
168
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, actualLength, fieldOffset, buffer.Length, bufferOffset, length );
183
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
* sizeof(char), value.Length,
1354
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, fieldOffset, buffer.Length, bufferOffset, length );
1374
if ( metaData.
MaxLength
>= 0 && length > metaData.
MaxLength
) {
1375
length = metaData.
MaxLength
;
1389
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, fieldOffset, buffer.Length, bufferOffset, length );
2474
int length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, buffer.Length, offset, buffer.Length - offset );
2480
int length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, buffer.Length, offset, buffer.Length - offset );
2488
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, value.Length, offset, value.Length - offset );
2503
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, checked( (int) bufferLength ), offset, checked( (int) bufferLength ) );
2538
length = CheckXetParameters(metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, NoLengthLimit /* buffer length */, offset, NoLengthLimit /* requested length */ );
2572
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, checked( (int) bufferLength ), offset, checked( (int) bufferLength ) );
2586
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, checked( (int) bufferLength ), offset, checked( (int) bufferLength - offset ) );
2646
length = CheckXetParameters(metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, NoLengthLimit /* buffer length */, offset, NoLengthLimit /* requested length */ );
2678
int length = CheckXetParameters(metaData.SqlDbType, metaData.
MaxLength
, value.Length, 0, NoLengthLimit /* buffer */, offset, NoLengthLimit /* request */);
2693
length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, checked( (int) bufferLength ), offset, checked( (int) bufferLength - offset ) );
2704
int length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, stringValue.Length, offset, stringValue.Length - offset );
2711
int length = CheckXetParameters( metaData.SqlDbType, metaData.
MaxLength
, NoLengthLimit /* actual */, 0, value.Length, offset, checked( value.Length - offset ) );
3223
long len = metadata.
MaxLength
;
3252
long len = metadata.
MaxLength
;
fx\src\data\System\Data\SqlClient\SqlCommand.cs (3)
6286
if (size > 0 && size != Int32.MaxValue && requestMetaData[index].
MaxLength
== SmiMetaData.UnlimitedMaxLengthIndicator) {
6293
if (size > 0 && size != Int32.MaxValue/2 && requestMetaData[index].
MaxLength
== SmiMetaData.UnlimitedMaxLengthIndicator) {
6300
if (size < SmiMetaData.DefaultTimestamp.
MaxLength
) {
fx\src\data\System\Data\SqlClient\SqlDataReaderSmi.cs (1)
552
long maxLength = colMetaData.
MaxLength
;
fx\src\data\System\Data\SqlClient\SqlParameter.cs (1)
348
maxlen = MSS.SmiMetaData.GetDefaultForType( mt.SqlDbType ).
MaxLength
;
fx\src\data\System\Data\SqlClient\TdsParser.cs (24)
6141
WriteSqlVariantHeader((int)(dateTime2MetaData.
MaxLength
+ 3), TdsEnums.SQLDATETIME2, 1 /* one scale prop */, stateObj);
6143
WriteDateTime2(value, dateTime2MetaData.Scale, (int)(dateTime2MetaData.
MaxLength
), stateObj);
6150
WriteSqlVariantHeader((int)(dateMetaData.
MaxLength
+ 2), TdsEnums.SQLDATE, 0 /* one scale prop */, stateObj);
8854
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8858
WriteUnsignedShort(checked((ushort)metaData.
MaxLength
), stateObj);
8862
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8866
WriteUnsignedShort(checked((ushort)(metaData.
MaxLength
)), stateObj);
8872
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8882
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8890
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8894
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8898
WriteUnsignedShort(checked((ushort)(metaData.
MaxLength
*2)), stateObj);
8910
if (MSS.SmiMetaData.UnlimitedMaxLengthIndicator == metaData.
MaxLength
) {
8914
WriteUnsignedShort(checked((ushort)(metaData.
MaxLength
*2)), stateObj);
8921
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8925
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8929
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8933
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8937
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8947
WriteShort(checked((int)metaData.
MaxLength
), stateObj);
8951
stateObj.WriteByte(checked((byte)metaData.
MaxLength
));
8955
WriteUnsignedShort(unchecked((ushort)metaData.
MaxLength
), stateObj);
8959
WriteUnsignedShort(unchecked((ushort)metaData.
MaxLength
), stateObj);
8965
WriteInt(checked((int)metaData.
MaxLength
), stateObj);
fx\src\data\System\Data\SqlClient\TdsValueSetter.cs (19)
123
_stateObj.WriteByte((byte)_metaData.
MaxLength
);
141
_stateObj.WriteByte((byte)_metaData.
MaxLength
);
384
_stateObj.WriteByte((byte)_metaData.
MaxLength
);
397
_stateObj.WriteByte((byte)_metaData.
MaxLength
);
421
_stateObj.WriteByte((byte)_metaData.
MaxLength
);
443
_stateObj.WriteByte((byte)_metaData.
MaxLength
);
456
_stateObj.WriteByte((byte)_metaData.
MaxLength
);
504
_stateObj.WriteByte((byte)_metaData.
MaxLength
);
506
TdsDateTime dt = MetaType.FromDateTime(value, (byte)_metaData.
MaxLength
);
512
TdsDateTime dt = MetaType.FromDateTime(value, (byte)_metaData.
MaxLength
);
519
_stateObj.WriteByteArray(BitConverter.GetBytes(time), (int)_metaData.
MaxLength
- 3, 0);
532
Debug.Assert(SmiMetaData.DefaultUniqueIdentifier.
MaxLength
== bytes.Length, "Invalid length for guid bytes: " + bytes.Length);
538
Debug.Assert(_metaData.
MaxLength
== bytes.Length, "Unexpected uniqueid metadata length: " + _metaData.
MaxLength
);
540
_stateObj.WriteByte((byte)_metaData.
MaxLength
);
553
length = (byte)SmiMetaData.DefaultTime.
MaxLength
;
558
length = (byte)_metaData.
MaxLength
;
576
length = (byte)dateTimeOffsetMetaData.
MaxLength
;
581
length = (byte)_metaData.
MaxLength
;