54 references to MaxLength
System.Data (54)
fx\src\data\Microsoft\SqlServer\Server\MetadataUtilsSmi.cs (2)
556source.MaxLength, 574firstMd.MaxLength == secondMd.MaxLength &&
fx\src\data\System\Data\Sql\SqlMetaData.cs (52)
742if (value.Length < MaxLength) 743value = value.PadRight((int)MaxLength); 758if (value.Length > MaxLength && Max != MaxLength) 759value = value.Remove((int)MaxLength, (int)(value.Length - MaxLength)); 878if (value.Value.Length < MaxLength) 879return new SqlString(value.Value.PadRight((int)MaxLength)); 893if (value.Value.Length > MaxLength && Max != MaxLength) 894value = new SqlString(value.Value.Remove((int)MaxLength, (int)(value.Value.Length - MaxLength))); 904if (value.Length < MaxLength) { 906byte[] rgbNewValue = new byte[ MaxLength ]; 923if (value.Length > MaxLength && Max != MaxLength) { 925byte[] rgbNewValue = new byte[ MaxLength ]; 926Array.Copy(rgbValue, rgbNewValue, (int)MaxLength); 946if (oldLength < MaxLength) { 948if (value.MaxLength < MaxLength) { 949char[] rgchNew = new char[ (int)MaxLength ]; 956for(long i=oldLength; i<MaxLength; i++) 959value.SetLength(MaxLength); 974if (value.Length > MaxLength && Max != MaxLength) 975value.SetLength(MaxLength); 988if (oldLength < MaxLength) 991if (value.MaxLength < MaxLength) 993byte[] rgbNew = new byte[ MaxLength ]; 1001value.SetLength(MaxLength); 1016if (value.Length > MaxLength && Max != MaxLength) 1017value.SetLength(MaxLength); 1203maxLen = sxm_rgDefaults[(int)SqlDbType.VarBinary].MaxLength; 1259smd = new SqlMetaData(name, SqlDbType.NVarChar, sxm_rgDefaults[(int)SqlDbType.NVarChar].MaxLength); 1275maxLen = sxm_rgDefaults[(int)SqlDbType.NVarChar].MaxLength; 1290maxLen = sxm_rgDefaults[(int)SqlDbType.VarBinary].MaxLength; 1331if (value.Length < MaxLength) 1333byte[] rgbNewValue = new byte[ MaxLength ]; 1351if (value.Length > MaxLength && Max != MaxLength) 1353byte[] rgbNewValue = new byte[ MaxLength]; 1354Array.Copy(value, rgbNewValue, (int)MaxLength); 1365if (1 != MaxLength) 1368else if ( (1 > MaxLength) || // char must have max length of at least 1 1387if (oldLength < MaxLength) 1389char[] rgchNew = new char[ (int)MaxLength ]; 1411if (value.Length > MaxLength && Max != MaxLength) 1413char[] rgchNewValue = new char[ MaxLength ]; 1414Array.Copy(value, rgchNewValue, (int)MaxLength); 1553m_lMaxLength = smdDflt.MaxLength;