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