154 references to Format
System.Data.Common (154)
src\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (8)
281
return Argument(SR.
Format
(SR.ADP_ConnectionStringSyntax, index));
285
return Argument(SR.
Format
(SR.ADP_KeywordNotSupported, keyword));
301
return Argument(SR.
Format
(SR.ADP_InvalidConnectionOptionValue, key), inner);
347
return SR.
Format
(SR.ADP_ConnectionStateMsg, state.ToString());
356
return InvalidOperation(SR.
Format
(SR.ADP_StreamClosed, method));
445
return InvalidOperation(SR.
Format
(SR.ADP_InternalProviderError, (int)internalError));
453
return InvalidOperation(SR.
Format
(SR.ADP_DataReaderClosed, method));
469
return IndexOutOfRange(SR.
Format
(SR.SQL_InvalidDataLength, length.ToString(CultureInfo.InvariantCulture)));
src\runtime\src\libraries\Common\src\System\Data\Common\SQLResource.cs (3)
58
return SR.
Format
(SR.SqlMisc_InvalidOpStreamNonWritable, method);
63
return SR.
Format
(SR.SqlMisc_InvalidOpStreamNonReadable, method);
68
return SR.
Format
(SR.SqlMisc_InvalidOpStreamNonSeekable, method);
System\Data\Common\AdapterUtil.Common.cs (14)
52
throw Argument(SR.
Format
(SR.ADP_EmptyString, parameterName));
60
throw Argument(SR.
Format
(SR.ADP_EmptyArray, parameterName));
294
return Provider(SR.
Format
(SR.ADP_MissingSelectCommand, method));
330
return DataMapping(SR.
Format
(SR.ADP_MissingColumnMapping, srcColumn));
342
return DataMapping(SR.
Format
(SR.ADP_MissingTableMapping, srcTable));
348
return DataMapping(SR.
Format
(SR.ADP_MissingTableMappingDestination, dstTable));
505
return InvalidOperation(SR.
Format
(resource, ADP.ConnectionStateMsg(state)));
513
return Argument(SR.
Format
(SR.ADP_UnwantedStatementType, statementType.ToString()));
529
return Argument(SR.
Format
(SR.ADP_InvalidMaxRecords, max.ToString(CultureInfo.InvariantCulture)), parameter);
533
return Argument(SR.
Format
(SR.ADP_InvalidStartRecord, start.ToString(CultureInfo.InvariantCulture)), parameter);
549
return DataAdapter(SR.
Format
(SR.ADP_MissingDataReaderFieldType, index));
564
return InvalidOperation(SR.
Format
(SR.ADP_UpdateRequiresSourceTable, defaultSrcTableName));
568
return InvalidOperation(SR.
Format
(SR.ADP_UpdateRequiresSourceTableName, srcTable));
639
return Argument(SR.
Format
(SR.ADP_UpdateMismatchRowTable, i.ToString(CultureInfo.InvariantCulture)));
System\Data\Common\DbProviderFactories.cs (3)
154
return throwOnError ? throw ADP.Argument(SR.
Format
(SR.ADP_DbProviderFactories_InvariantNameNotFound, providerInvariantName)) : (DbProviderFactory?)null;
173
throw ADP.Argument(SR.
Format
(SR.ADP_DbProviderFactories_NotAFactoryType, providerFactoryClass.FullName));
199
throw ADP.Argument(SR.
Format
(SR.ADP_DbProviderFactories_FactoryNotLoadable, assemblyQualifiedName));
System\Data\DataException.cs (93)
370
public static Exception ArgumentNull(string paramName) => _ArgumentNull(paramName, SR.
Format
(SR.Data_ArgumentNull, paramName));
371
public static Exception ArgumentOutOfRange(string paramName) => _ArgumentOutOfRange(paramName, SR.
Format
(SR.Data_ArgumentOutOfRange, paramName));
372
public static Exception BadObjectPropertyAccess(string error) => _InvalidOperation(SR.
Format
(SR.DataConstraint_BadObjectPropertyAccess, error));
374
public static Exception TypeNotAllowed(Type type) => _InvalidOperation(SR.
Format
(SR.Data_TypeNotAllowed, type.AssemblyQualifiedName));
393
public static Exception CaseInsensitiveNameConflict(string? name) => _Argument(SR.
Format
(SR.Data_CaseInsensitiveNameConflict, name));
394
public static Exception NamespaceNameConflict(string? name) => _Argument(SR.
Format
(SR.Data_NamespaceNameConflict, name));
403
public static Exception ColumnOutOfRange(int index) => _IndexOutOfRange(SR.
Format
(SR.DataColumns_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
404
public static Exception ColumnOutOfRange(string column) => _IndexOutOfRange(SR.
Format
(SR.DataColumns_OutOfRange, column));
405
public static Exception CannotAddColumn1(string column) => _Argument(SR.
Format
(SR.DataColumns_Add1, column));
406
public static Exception CannotAddColumn2(string column) => _Argument(SR.
Format
(SR.DataColumns_Add2, column));
408
public static Exception CannotAddColumn4(string column) => _Argument(SR.
Format
(SR.DataColumns_Add4, column));
409
public static Exception CannotAddDuplicate(string column) => _DuplicateName(SR.
Format
(SR.DataColumns_AddDuplicate, column));
410
public static Exception CannotAddDuplicate2(string table) => _DuplicateName(SR.
Format
(SR.DataColumns_AddDuplicate2, table));
411
public static Exception CannotAddDuplicate3(string table) => _DuplicateName(SR.
Format
(SR.DataColumns_AddDuplicate3, table));
414
public static Exception CannotRemoveChildKey(string relation) => _Argument(SR.
Format
(SR.DataColumns_RemoveChildKey, relation));
418
public static Exception InvalidOrdinal(string name, int ordinal) => _ArgumentOutOfRange(name, SR.
Format
(SR.DataColumn_OrdinalExceedMaximum, (ordinal).ToString(CultureInfo.InvariantCulture)));
426
public static Exception ConstraintViolation(string constraint) => _Constraint(SR.
Format
(SR.DataConstraint_Violation, constraint));
427
public static Exception ConstraintNotInTheTable(string constraint) => _Argument(SR.
Format
(SR.DataConstraint_NotInTheTable, constraint));
457
public static Exception ConstraintOutOfRange(int index) => _IndexOutOfRange(SR.
Format
(SR.DataConstraint_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
458
public static Exception DuplicateConstraint(string constraint) => _Data(SR.
Format
(SR.DataConstraint_Duplicate, constraint));
459
public static Exception DuplicateConstraintName(string constraint) => _DuplicateName(SR.
Format
(SR.DataConstraint_DuplicateName, constraint));
464
public static Exception ConstraintAddFailed(DataTable table) => _InvalidConstraint(SR.
Format
(SR.DataConstraint_AddFailed, table.TableName));
466
public static Exception FailedCascadeDelete(string constraint) => _InvalidConstraint(SR.
Format
(SR.DataConstraint_CascadeDelete, constraint));
467
public static Exception FailedCascadeUpdate(string constraint) => _InvalidConstraint(SR.
Format
(SR.DataConstraint_CascadeUpdate, constraint));
470
public static Exception RemoveParentRow(ForeignKeyConstraint constraint) => _InvalidConstraint(SR.
Format
(SR.DataConstraint_RemoveParentRow, constraint.ConstraintName));
471
public static string MaxLengthViolationText(string columnName) => SR.
Format
(SR.DataColumn_ExceedMaxLength, columnName);
472
public static string NotAllowDBNullViolationText(string columnName) => SR.
Format
(SR.DataColumn_NotAllowDBNull, columnName);
473
public static Exception CantAddConstraintToMultipleNestedTable(string tableName) => _Argument(SR.
Format
(SR.DataConstraint_CantAddConstraintToMultipleNestedTable, tableName));
495
public static Exception ExpressionInConstraint(DataColumn column) => _Argument(SR.
Format
(SR.DataColumn_ExpressionInConstraint, column.ColumnName));
497
public static Exception NonUniqueValues(string column) => _InvalidConstraint(SR.
Format
(SR.DataColumn_NonUniqueValues, column));
498
public static Exception NullKeyValues(string column) => _Data(SR.
Format
(SR.DataColumn_NullKeyValues, column));
499
public static Exception NullValues(string column) => _NoNullAllowed(SR.
Format
(SR.DataColumn_NullValues, column));
501
public static Exception ReadOnly(string column) => _ReadOnly(SR.
Format
(SR.DataColumn_ReadOnly, column));
504
public static Exception CannotSetToNull(DataColumn column) => _Argument(SR.
Format
(SR.DataColumn_CannotSetToNull, column.ColumnName));
505
public static Exception LongerThanMaxLength(DataColumn column) => _Argument(SR.
Format
(SR.DataColumn_LongerThanMaxLength, column.ColumnName));
507
public static Exception CannotSetMaxLength2(DataColumn column) => _Argument(SR.
Format
(SR.DataColumn_CannotSetMaxLength2, column.ColumnName));
510
public static Exception CannotChangeNamespace(string columnName) => _Argument(SR.
Format
(SR.DataColumn_CannotChangeNamespace, columnName));
511
public static Exception HasToBeStringType(DataColumn column) => _Argument(SR.
Format
(SR.DataColumn_HasToBeStringType, column.ColumnName));
512
public static Exception AutoIncrementCannotSetIfHasData(string typeName) => _Argument(SR.
Format
(SR.DataColumn_AutoIncrementCannotSetIfHasData, typeName));
513
public static Exception INullableUDTwithoutStaticNull(string typeName) => _Argument(SR.
Format
(SR.DataColumn_INullableUDTwithoutStaticNull, typeName));
514
public static Exception IComparableNotImplemented(string typeName) => _Data(SR.
Format
(SR.DataStorage_IComparableNotDefined, typeName));
515
public static Exception UDTImplementsIChangeTrackingButnotIRevertible(string typeName) => _InvalidOperation(SR.
Format
(SR.DataColumn_UDTImplementsIChangeTrackingButnotIRevertible, typeName));
517
public static Exception InvalidDataColumnMapping(Type type) => _Argument(SR.
Format
(SR.DataColumn_InvalidDataColumnMapping, type.AssemblyQualifiedName));
527
public static Exception SetFailed(string name) => _Data(SR.
Format
(SR.DataView_SetFailed, name));
542
public static Exception GetElementIndex(int index) => _IndexOutOfRange(SR.
Format
(SR.DataView_GetElementIndex, (index).ToString(CultureInfo.InvariantCulture)));
548
public static Exception ColumnToSortIsOutOfRange(string column) => _Argument(SR.
Format
(SR.DataColumns_OutOfRange, column));
556
public static Exception KeyTooManyColumns(int cols) => _InvalidConstraint(SR.
Format
(SR.DataKey_TooManyColumns, (cols).ToString(CultureInfo.InvariantCulture)));
557
public static Exception KeyDuplicateColumns(string columnName) => _InvalidConstraint(SR.
Format
(SR.DataKey_DuplicateColumns, columnName));
575
public static Exception TableCantBeNestedInTwoTables(string tableName) => _Argument(SR.
Format
(SR.DataRelation_TableCantBeNestedInTwoTables, tableName));
576
public static Exception LoopInNestedRelations(string tableName) => _Argument(SR.
Format
(SR.DataRelation_LoopInNestedRelations, tableName));
580
public static Exception InValidNestedRelation(string childTableName) => _InvalidOperation(SR.
Format
(SR.DataRelation_InValidNestedRelation, childTableName));
581
public static Exception InvalidParentNamespaceinNestedRelation(string childTableName) => _InvalidOperation(SR.
Format
(SR.DataRelation_InValidNamespaceInNestedRelation, childTableName));
604
public static Exception RowOutOfRange(int index) => _IndexOutOfRange(SR.
Format
(SR.DataRow_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
605
public static Exception RowInsertOutOfRange(int index) => _IndexOutOfRange(SR.
Format
(SR.DataRow_RowInsertOutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
607
public static Exception RowInsertMissing(string tableName) => _IndexOutOfRange(SR.
Format
(SR.DataRow_RowInsertMissing, tableName));
618
internal static Exception SetDataSetNameConflicting(string name) => _Argument(SR.
Format
(SR.DataSet_SetDataSetNameConflicting, name));
619
public static Exception DataSetUnsupportedSchema(string ns) => _Argument(SR.
Format
(SR.DataSet_UnsupportedSchema, ns));
620
public static Exception MergeMissingDefinition(string obj) => _Argument(SR.
Format
(SR.DataMerge_MissingDefinition, obj));
632
_Argument(SR.
Format
(SR.DataKey_RemovePrimaryKey1, table.TableName));
635
public static Exception RelationNotInTheDataSet(string relation) => _Argument(SR.
Format
(SR.DataRelation_NotInTheDataSet, relation));
636
public static Exception RelationOutOfRange(object index) => _IndexOutOfRange(SR.
Format
(SR.DataRelation_OutOfRange, Convert.ToString(index, null)));
637
public static Exception DuplicateRelation(string relation) => _DuplicateName(SR.
Format
(SR.DataRelation_DuplicateName, relation));
659
public static Exception InvalidSortString(string sort) => _Argument(SR.
Format
(SR.DataTable_InvalidSortString, sort));
660
public static Exception DuplicateTableName(string table) => _DuplicateName(SR.
Format
(SR.DataTable_DuplicateName, table));
662
public static Exception SelfnestedDatasetConflictingName(string table) => _DuplicateName(SR.
Format
(SR.DataTable_SelfnestedDatasetConflictingName, table));
663
public static Exception DatasetConflictingName(string table) => _DuplicateName(SR.
Format
(SR.DataTable_DatasetConflictingName, table));
666
public static Exception TableOutOfRange(int index) => _IndexOutOfRange(SR.
Format
(SR.DataTable_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
667
public static Exception TableNotInTheDataSet(string table) => _Argument(SR.
Format
(SR.DataTable_NotInTheDataSet, table));
674
public static Exception TableNotFound(string tableName) => _Argument(SR.
Format
(SR.DataTable_TableNotFound, tableName));
681
public static Exception InvalidStorageType(TypeCode typecode) => _Data(SR.
Format
(SR.DataStorage_InvalidStorageType, typecode.ToString()));
685
public static Exception ProblematicChars(char charValue) => _Argument(SR.
Format
(SR.DataStorage_ProblematicChars, $"0x{(ushort)charValue:X}"));
697
public static Exception ElementTypeNotFound(string name) => _Data(SR.
Format
(SR.Xml_ElementTypeNotFound, name));
698
public static Exception RelationParentNameMissing(string rel) => _Data(SR.
Format
(SR.Xml_RelationParentNameMissing, rel));
699
public static Exception RelationChildNameMissing(string rel) => _Data(SR.
Format
(SR.Xml_RelationChildNameMissing, rel));
700
public static Exception RelationTableKeyMissing(string rel) => _Data(SR.
Format
(SR.Xml_RelationTableKeyMissing, rel));
701
public static Exception RelationChildKeyMissing(string rel) => _Data(SR.
Format
(SR.Xml_RelationChildKeyMissing, rel));
702
public static Exception UndefinedDatatype(string name) => _Data(SR.
Format
(SR.Xml_UndefinedDatatype, name));
705
public static Exception InvalidField(string name) => _Data(SR.
Format
(SR.Xml_InvalidField, name));
706
public static Exception InvalidSelector(string name) => _Data(SR.
Format
(SR.Xml_InvalidSelector, name));
707
public static Exception CircularComplexType(string name) => _Data(SR.
Format
(SR.Xml_CircularComplexType, name));
708
public static Exception CannotInstantiateAbstract(string name) => _Data(SR.
Format
(SR.Xml_CannotInstantiateAbstract, name));
709
public static Exception InvalidKey(string name) => _Data(SR.
Format
(SR.Xml_InvalidKey, name));
711
public static Exception DuplicateConstraintRead(string str) => _Data(SR.
Format
(SR.Xml_DuplicateConstraint, str));
712
public static Exception ColumnTypeConflict(string name) => _Data(SR.
Format
(SR.Xml_ColumnConflict, name));
715
public static Exception InvalidPrefix(string name) => _Data(SR.
Format
(SR.Xml_InvalidPrefix_SpecialCharacters, name));
721
public static Exception NestedCircular(string name) => _Data(SR.
Format
(SR.Xml_NestedCircular, name));
722
public static Exception MultipleParentRows(string tableQName) => _Data(SR.
Format
(SR.Xml_MultipleParentRows, tableQName));
723
public static Exception PolymorphismNotSupported(string typeName) => _InvalidOperation(SR.
Format
(SR.Xml_PolymorphismNotSupported, typeName));
734
public static Exception DuplicateDeclaration(string name) => _Data(SR.
Format
(SR.Xml_MergeDuplicateDeclaration, name));
744
public static Exception InvalidDataTableReader(string tableName) => _InvalidOperation(SR.
Format
(SR.DataTableReader_InvalidDataTableReader, tableName));
745
public static Exception DataTableReaderSchemaIsInvalid(string tableName) => _InvalidOperation(SR.
Format
(SR.DataTableReader_SchemaInvalidDataTableReader, tableName));
750
public static Exception EmptyDataTableReader(string tableName) => _DeletedRowInaccessible(SR.
Format
(SR.DataTableReader_DataTableCleared, tableName));
754
internal static Exception InternalRBTreeError(RBTreeError internalError) => _InvalidOperation(SR.
Format
(SR.RbTree_InvalidState, (int)internalError));
System\Data\DataRowExtensions.cs (1)
178
throw DataSetUtil.InvalidCast(SR.
Format
(SR.DataSetLinq_NonNullableCast, typeof(T)));
System\Data\Filter\FilterException.cs (23)
96
string err = SR.
Format
(SR.Expr_NYI, moreinfo);
103
return _Syntax(SR.
Format
(SR.Expr_MissingOperand, Operators.ToString(before._op)));
108
return _Syntax(SR.
Format
(SR.Expr_MissingOperand, token));
113
return _Eval(SR.
Format
(SR.Expr_TypeMismatch, expr));
118
return ExceptionBuilder._ArgumentOutOfRange(arg, SR.
Format
(SR.Expr_ArgumentOutofRange, func));
128
return _Eval(SR.
Format
(SR.Expr_UnboundName, name));
133
return _Syntax(SR.
Format
(SR.Expr_InvalidString, str));
138
return _Eval(SR.
Format
(SR.Expr_UndefinedFunction, name));
148
return _Eval(SR.
Format
(SR.Expr_FunctionArgumentCount, name));
178
return _Syntax(SR.
Format
(SR.Expr_InvalidName, name));
183
return _Syntax(SR.
Format
(SR.Expr_InvalidDate, date));
193
return _Eval(SR.
Format
(SR.Expr_InvalidPattern, pat));
213
return _Overflow(SR.
Format
(SR.Expr_Overflow, type.Name));
238
return _Eval(SR.
Format
(SR.Expr_UnsupportedOperator, Operators.ToString(op)));
243
return _Syntax(SR.
Format
(SR.Expr_InvalidNameBracketing, name));
248
return _Syntax(SR.
Format
(SR.Expr_MissingOperandBefore, op));
263
return _Eval(SR.
Format
(SR.Expr_BindFailure, relationName));
273
return _Eval(SR.
Format
(SR.Expr_AggregateUnbound, expr));
283
return _Eval(SR.
Format
(SR.Expr_ExpressionUnbound, expr));
288
return _Eval(SR.
Format
(SR.Expr_ComputeNotAggregate, expr));
293
return _Eval(SR.
Format
(SR.Expr_FilterConversion, expr));
303
return _Eval(SR.
Format
(SR.Expr_InvalidType, typeName));
328
return ExceptionBuilder._Argument(SR.
Format
(SR.Expr_UnsupportedType, type.FullName));
System\Data\LinqDataView.cs (3)
127
throw DataSetUtil.InvalidOperation(SR.
Format
(SR.LDV_InvalidNumOfKeys, sortExpressionBuilder.Count));
155
throw DataSetUtil.InvalidOperation(SR.
Format
(SR.LDV_InvalidNumOfKeys, sortExpressionBuilder.Count));
195
throw DataSetUtil.InvalidOperation(SR.
Format
(SR.LDV_InvalidNumOfKeys, sortExpressionBuilder.Count));
System\Data\Merger.cs (5)
381
_dataSet!.RaiseMergeFailed(targetTable, SR.
Format
(SR.DataMerge_DataTypeMismatch, src.ColumnName), MissingSchemaAction.Error);
383
throw ExceptionBuilder.MergeFailed(SR.
Format
(SR.DataMerge_DataTypeMismatch, src.ColumnName));
536
SR.
Format
(SR.DataMerge_MissingDefinition, relation.RelationName),
547
SR.
Format
(SR.DataMerge_ReltionKeyColumnsMismatch, relation.RelationName),
557
SR.
Format
(SR.DataMerge_ReltionKeyColumnsMismatch, relation.RelationName),
System\Xml\XmlDataDocument.cs (1)
1076
_ => throw new InvalidOperationException(SR.
Format
(SR.DataDom_CloneNode, dp.NodeType.ToString())),