59 references to Format
System.Data.Common (59)
src\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (11)
202
ArgumentException e = new ArgumentException(SR.
Format
(SR.ADP_InvalidMultipartName, property, value));
209
ArgumentException e = new ArgumentException(SR.
Format
(SR.ADP_InvalidMultipartNameQuoteUsage, property, value));
273
return ArgumentOutOfRange(SR.
Format
(SR.ADP_InvalidEnumerationValue, type.Name, value.ToString(CultureInfo.InvariantCulture)), type.Name);
289
return ADP.Argument(SR.
Format
(SR.SqlConvert_ConvertFailed, fromType.FullName, toType.FullName), innerException);
309
return Argument(SR.
Format
(SR.ADP_CollectionRemoveInvalidObject, itemType.Name, collection.GetType().Name));
313
return ArgumentNull(parameter, SR.
Format
(SR.ADP_CollectionNullValue, collection.Name, itemType.Name));
395
return Argument(SR.
Format
(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
399
return Argument(SR.
Format
(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
457
return ArgumentOutOfRange(SR.
Format
(SR.ADP_InvalidSourceBufferIndex, maxLen.ToString(CultureInfo.InvariantCulture), srcOffset.ToString(CultureInfo.InvariantCulture)), parameterName);
461
return ArgumentOutOfRange(SR.
Format
(SR.ADP_InvalidDestinationBufferIndex, maxLen.ToString(CultureInfo.InvariantCulture), dstOffset.ToString(CultureInfo.InvariantCulture)), parameterName);
465
return IndexOutOfRange(SR.
Format
(SR.SQL_InvalidBufferSizeOrIndex, numBytes.ToString(CultureInfo.InvariantCulture), bufferIndex.ToString(CultureInfo.InvariantCulture)));
System\Data\Common\AdapterUtil.Common.cs (5)
280
return Argument(SR.
Format
(SR.SQL_WrongType, got, expected));
308
return DataMapping(SR.
Format
(SR.ADP_ColumnSchemaExpression, srcColumn, cacheColumn));
336
return DataMapping(SR.
Format
(SR.ADP_MissingTableSchema, cacheTable, srcTable));
598
DBConcurrencyException exception = new DBConcurrencyException(SR.
Format
(resource, affected.ToString(CultureInfo.InvariantCulture), expected.ToString(CultureInfo.InvariantCulture)), null, dataRows);
683
return InvalidOperation(SR.
Format
(SR.ADP_DynamicSQLNestedQuote, name, quote));
System\Data\DataException.cs (31)
346
=> _InvalidEnumArgumentException(SR.
Format
(SR.ADP_InvalidEnumerationValue, typeof(T).Name, value.ToString()));
401
public static Exception ColumnNotInTheTable(string column, string table) => _Argument(SR.
Format
(SR.DataColumn_NotInTheTable, column, table));
415
public static Exception CannotRemoveConstraint(string constraint, string table) => _Argument(SR.
Format
(SR.DataColumns_RemoveConstraint, constraint, table));
416
public static Exception CannotRemoveExpression(string column, string expression) => _Argument(SR.
Format
(SR.DataColumns_RemoveExpression, column, expression));
417
public static Exception ColumnNotInTheUnderlyingTable(string column, string table) => _Argument(SR.
Format
(SR.DataColumn_NotInTheUnderlyingTable, column, table));
448
return SR.
Format
(SR.DataConstraint_ViolationValue, columnNames, KeysToString(values));
452
return SR.
Format
(SR.DataConstraint_ViolationValue, columns[0].ColumnName, Convert.ToString(values[0], null));
460
public static Exception NeededForForeignKeyConstraint(UniqueConstraint key, ForeignKeyConstraint fk) => _Argument(SR.
Format
(SR.DataConstraint_NeededForForeignKeyConstraint, key.ConstraintName, fk.ConstraintName));
469
public static Exception ForeignKeyViolation(string constraint, object[] keys) => _InvalidConstraint(SR.
Format
(SR.DataConstraint_ForeignKeyViolation, constraint, KeysToString(keys)));
488
_Argument(SR.
Format
(SR.DataColumn_DefaultValueDataType1, defaultType.FullName, columnType.FullName), inner) :
494
public static Exception ExpressionAndConstraint(DataColumn column, Constraint constraint) => _Argument(SR.
Format
(SR.DataColumn_ExpressionAndConstraint, column.ColumnName, constraint.ConstraintName));
506
public static Exception CannotSetMaxLength(DataColumn column, int value) => _Argument(SR.
Format
(SR.DataColumn_CannotSetMaxLength, column.ColumnName, value.ToString(CultureInfo.InvariantCulture)));
508
public static Exception CannotSetSimpleContentType(string columnName, Type type) => _Argument(SR.
Format
(SR.DataColumn_CannotSimpleContentType, columnName, type));
509
public static Exception CannotSetSimpleContent(string columnName, Type type) => _Argument(SR.
Format
(SR.DataColumn_CannotSimpleContent, columnName, type));
520
public static Exception CantChangeDateTimeMode(DataSetDateTime oldValue, DataSetDateTime newValue) => _InvalidOperation(SR.
Format
(SR.DataColumn_DateTimeMode, oldValue.ToString(), newValue.ToString()));
547
public static Exception PropertyNotFound(string property, string table) => _Argument(SR.
Format
(SR.DataROWView_PropertyNotFound, property, table));
570
public static Exception RelationForeignTable(string t1, string t2) => _InvalidConstraint(SR.
Format
(SR.DataRelation_ForeignTable, t1, t2));
571
public static Exception GetParentRowTableMismatch(string t1, string t2) => _InvalidConstraint(SR.
Format
(SR.DataRelation_GetParentRowTableMismatch, t1, t2));
572
public static Exception SetParentRowTableMismatch(string t1, string t2) => _InvalidConstraint(SR.
Format
(SR.DataRelation_SetParentRowTableMismatch, t1, t2));
606
public static Exception RowInsertTwice(int index, string tableName) => _IndexOutOfRange(SR.
Format
(SR.DataRow_RowInsertTwice, (index).ToString(CultureInfo.InvariantCulture), tableName));
629
_Argument(SR.
Format
(SR.DataIndex_KeyLength, (length).ToString(CultureInfo.InvariantCulture), (keyLength).ToString(CultureInfo.InvariantCulture)));
648
public static Exception InvalidSchemaSerializationMode(Type enumType, string mode) => _InvalidEnumArgumentException(SR.
Format
(SR.ADP_InvalidEnumerationValue, enumType.Name, mode));
661
public static Exception DuplicateTableName2(string table, string ns) => _DuplicateName(SR.
Format
(SR.DataTable_DuplicateName2, table, ns));
669
public static Exception TableInConstraint(DataTable table, Constraint constraint) => _Argument(SR.
Format
(SR.DataTable_InConstraint, table.TableName, constraint.ConstraintName));
680
public static Exception AggregateException(AggregateType aggregateType, Type type) => _Data(SR.
Format
(SR.DataStorage_AggregateException, aggregateType, type.Name));
682
public static Exception RangeArgument(int min, int max) => _Argument(SR.
Format
(SR.Range_Argument, (min).ToString(CultureInfo.InvariantCulture), (max).ToString(CultureInfo.InvariantCulture)));
694
public static Exception MissingAttribute(string element, string attribute) => _Data(SR.
Format
(SR.Xml_MissingAttribute, element, attribute));
695
public static Exception InvalidAttributeValue(string name, string value) => _Data(SR.
Format
(SR.Xml_ValueOutOfRange, name, value));
713
public static Exception CannotConvert(string name, string? type) => _Data(SR.
Format
(SR.Xml_CannotConvert, name, type));
741
public static Exception ConvertFailed(Type type1, Type type2) => _Data(SR.
Format
(SR.SqlConvert_ConvertFailed, type1.FullName, type2.FullName));
751
internal static Exception InvalidDuplicateNamedSimpleTypeDelaration(string stName, string errorStr) => _Argument(SR.
Format
(SR.NamedSimpleType_InvalidDuplicateNamedSimpleTypeDelaration, stName, errorStr));
System\Data\DataSetUtil.cs (1)
50
return ArgumentOutOfRange(SR.
Format
(SR.DataSetLinq_InvalidEnumerationValue, type.Name, value.ToString(System.Globalization.CultureInfo.InvariantCulture)), type.Name);
System\Data\Filter\FilterException.cs (5)
158
return _Syntax(SR.
Format
(SR.Expr_UnknownToken, token, position.ToString(CultureInfo.InvariantCulture)));
168
return _Eval(SR.
Format
(SR.Expr_DatatypeConversion, type1.ToString(), type2.ToString()));
173
return _Eval(SR.
Format
(SR.Expr_DatavalueConversion, value.ToString(), type.ToString()));
223
return _Eval(SR.
Format
(SR.Expr_ArgumentTypeInteger, function, arg.ToString(CultureInfo.InvariantCulture)));
258
return _Eval(SR.
Format
(SR.Expr_UnresolvedRelation, name, expr));
System\Data\ForeignKeyConstraint.cs (1)
188
string error = SR.
Format
(SR.DataConstraint_ForeignKeyViolation, ConstraintName, ExceptionBuilder.KeysToString(childValues));
System\Data\Merger.cs (5)
367
_dataSet!.RaiseMergeFailed(targetTable, SR.
Format
(SR.DataMerge_MissingColumnDefinition, table.TableName, src.ColumnName), _missingSchemaAction);
371
throw ExceptionBuilder.MergeFailed(SR.
Format
(SR.DataMerge_MissingColumnDefinition, table.TableName, src.ColumnName));
427
SR.
Format
(SR.DataMerge_PrimaryKeyColumnsMismatch, targetPKey[i].ColumnName, tablePKey[i].ColumnName),
477
SR.
Format
(SR.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName),
503
SR.
Format
(SR.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName),