11 writes to length
System.Data (11)
fx\src\data\System\Data\SqlClient\TdsParser.cs (10)
3351
rec.
length
= length; // In Yukon this length is -1
4146
col.
length
= TdsEnums.SQL_USHORTVARMAXLEN; //Use the same length as other plp datatypes
4148
col.
length
= 0; // placeholder until we read the scale, just make sure it's not SQL_USHORTVARMAXLEN
4150
col.
length
= 3;
4153
if (!TryGetTokenLength(tdsType, stateObj, out col.
length
)) {
4183
col.
length
= Int32.MaxValue;
4244
col.
length
= MetaType.GetTimeSizeFromScale(col.scale);
4248
col.
length
= 3 + MetaType.GetTimeSizeFromScale(col.scale);
4252
col.
length
= 5 + MetaType.GetTimeSizeFromScale(col.scale);
4378
metaData.
length
= shortLength;
fx\src\data\System\Data\SqlClient\TdsParserHelperClasses.cs (1)
863
this.
length
= original.length;
38 references to length
System.Data (38)
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (5)
621
int size = metadata.
length
;
637
int size = metadata.
length
;
1106
else if ((_enableStreaming) && (metadata.
length
== MAX_LENGTH) && (!_rowSourceIsSqlDataReaderSmi)) {
1322
int length = metadata.
length
;
1328
length = metadata.baseTI.
length
;
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (8)
307
int length = colMetaData.
length
;
521
schemaRow[Size] = (col.baseTI.metaType.IsSizeInCharacters && (col.baseTI.
length
!= 0x7fffffff)) ? (col.baseTI.
length
/ 2) : col.baseTI.
length
;
524
schemaRow[Size] = (col.metaType.IsSizeInCharacters && (col.
length
!= 0x7fffffff)) ? (col.
length
/ 2) : col.
length
;
3616
bytesRemaining = checked(bytesRemaining - _metaData[currentColumn].
length
);
fx\src\data\System\Data\SqlClient\TdsParser.cs (23)
4158
col.metaType = MetaType.GetSqlDataType(tdsType, userType, col.
length
);
4174
if (col.
length
== TdsEnums.SQL_USHORTVARMAXLEN) {
5048
int denormalizedLength = md.baseTI.
length
;
5186
byte[] bytes = new byte[md.baseTI.
length
];
5234
strValue = strValue.PadRight(md.baseTI.
length
);
5249
strValue = strValue.PadRight(md.baseTI.
length
/ ADP.CharSize);
9230
WriteTokenLength(mdPriv.tdsType, mdPriv.
length
, stateObj);
9243
WriteTokenLength(mdPriv.tdsType, mdPriv.
length
, stateObj);
9332
WriteTokenLength(md.tdsType, md.
length
, stateObj);
9342
WriteTokenLength(TdsEnums.SQLBIGVARBINARY, md.
length
, stateObj);
9355
WriteTokenLength(md.tdsType, md.
length
, stateObj);
9417
if (metadata.baseTI.
length
> 0 &&
9418
actualLengthInBytes > metadata.baseTI.
length
) { // see comments agove
9419
actualLengthInBytes = metadata.baseTI.
length
;
9438
if (metadata.baseTI.
length
> 0 &&
9439
actualLengthInBytes > metadata.baseTI.
length
) {
9440
actualLengthInBytes = metadata.baseTI.
length
; // this ensure truncation!
9449
if (metadata.baseTI.
length
> 0 &&
9450
actualLengthInBytes > metadata.baseTI.
length
) { // see comments above
9451
actualLengthInBytes = metadata.baseTI.
length
;
9457
actualLengthInBytes = metadata.baseTI.
length
;
9574
ccb = metadata.
length
;
9616
internalWriteTask = WriteValue(value, metatype, metadata.scale, ccb, ccbStringBytes, 0, stateObj, metadata.
length
, isDataFeed);
fx\src\data\System\Data\SqlClient\TdsParserHelperClasses.cs (2)
532
return type == SqlDbType.Udt &&
length
== Int32.MaxValue;
863
this.length = original.
length
;