534 references to ADP
System.Data.OleDb (534)
ColumnBinding.cs (5)
249throw ADP.InvalidOffsetValue(offset); 702ptr = ADP.IntPtrOffset(ptr, ValueBindingOffset); 749ptr = ADP.IntPtrOffset(ptr, ValueBindingOffset); 768ptr = ADP.IntPtrOffset(ptr, ValueBindingOffset); 1681return ADP.InvalidCast(); // UNDONE: NullValue exception
DbBindings.cs (2)
283if (ADP.IsDirection(parameters[i], ParameterDirection.Input)) 305if (ADP.IsDirection(parameters[i], ParameterDirection.Output))
DbConnectionOptions.cs (33)
184ADP.CheckArgumentNull(builder, "builder"); 185ADP.CheckArgumentLength(keyName, "keyName"); 189throw ADP.InvalidKeyname(keyName); 193throw ADP.InvalidValue(keyName); 280throw ADP.InvalidConnectionOptionValue(keyName); 303throw ADP.InvalidConnectionOptionValue(keyname, e); 307throw ADP.InvalidConnectionOptionValue(keyname, e); 348throw ADP.InvalidDataDirectory(); 350else if (ADP.IsEmpty(rootFolderPath)) 385if (!ADP.GetFullPath(fullPath).StartsWith(rootFolderPath, StringComparison.Ordinal)) 387throw ADP.InvalidConnectionOptionValue(keyword); 574{ throw ADP.ConnectionStringSyntax(startposition); } 593{ throw ADP.ConnectionStringSyntax(startposition); } 600if (ADP.IsEmpty(keyname)) 601{ throw ADP.ConnectionStringSyntax(startposition); } 626{ throw ADP.ConnectionStringSyntax(startposition); } 641{ throw ADP.ConnectionStringSyntax(startposition); } 655{ throw ADP.ConnectionStringSyntax(startposition); } 669{ throw ADP.ConnectionStringSyntax(startposition); } 686throw ADP.ConnectionStringSyntax(startposition); // unbalanced single quote 693throw ADP.ConnectionStringSyntax(currentPosition); 696throw ADP.InternalError(ADP.InternalErrorCode.InvalidParserState1); 708throw ADP.ConnectionStringSyntax(startposition); 713if (ADP.IsEmpty(keyname)) 714{ throw ADP.ConnectionStringSyntax(startposition); } 724throw ADP.ConnectionStringSyntax(startposition); // unquoted value must not end in quote, except for odbc 743throw ADP.InternalError(ADP.InternalErrorCode.InvalidParserState2); 789throw ADP.ConnectionStringSyntax(match.Length); 823throw ADP.KeywordNotSupported(keyname); 902if (ADP.IsEmpty(keyname)) 916throw ADP.KeywordNotSupported(keyname);
DbConnectionStringCommon.cs (3)
158throw ADP.ConvertFailed(value.GetType(), typeof(bool), e); 170throw ADP.ConvertFailed(value.GetType(), typeof(int), e); 182throw ADP.ConvertFailed(value.GetType(), typeof(string), e);
DbParameterHelper.cs (6)
28ADP.CheckArgumentNull(source, "source"); 73throw ADP.InvalidParameterDirection(value); 110throw ADP.InvalidSizeValue(value); 175throw ADP.InvalidDataRowVersion(value); 194ADP.CheckArgumentNull(destination, "destination"); 242if (!ADP.IsNull(value))
DbPropSet.cs (14)
144IntPtr vptr = ADP.IntPtrOffset(rgProperties, ODB.OffsetOf_tagDBPROP_Value); 145for (int k = 0; k < cProperties; ++k, vptr = ADP.IntPtrOffset(vptr, ODB.SizeOf_tagDBPROP)) 173throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer, lastErrorFromProvider); 177throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer); 189IntPtr propertySetPtr = ADP.IntPtrOffset(DangerousGetHandle(), index * ODB.SizeOf_tagDBPROPSET); 197IntPtr ptr = ADP.IntPtrOffset(propset.rgProperties, i * ODB.SizeOf_tagDBPROP); 219throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer, lastErrorFromProvider); 223throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer); 238IntPtr propsetPtr = ADP.IntPtrOffset(DangerousGetHandle(), index * ODB.SizeOf_tagDBPROPSET); 265IntPtr propertyPtr = ADP.IntPtrOffset(propset.rgProperties, i * ODB.SizeOf_tagDBPROP);
OleDb_Enum.cs (3)
275TypeCode.DBNull => throw ADP.InvalidDataType(TypeCode.DBNull), 291_ => throw ADP.UnknownDataTypeCode(value.GetType(), ic.GetTypeCode()), 341_ => throw ADP.DbTypeNotSupported(dbType, typeof(OleDbType)),
OleDb_Util.cs (45)
85if (ADP.IsEmpty(value)) 87return ADP.InvalidOperation(value, inner); 91return ADP.InvalidOperation(SR.Format(SR.OleDb_UninitializedParameters, index.ToString(CultureInfo.InvariantCulture), dbtype.ToString())); 95return ADP.DataAdapter(SR.Format(SR.OleDb_BadStatus_ParamAcc, index.ToString(CultureInfo.InvariantCulture), status.ToString())); 99return ADP.DataAdapter(SR.Format(SR.OleDb_NoProviderSupportForParameters, provider), inner); 103return ADP.DataAdapter(SR.Format(SR.OleDb_NoProviderSupportForSProcResetParameters, provider)); 169if (ADP.IsEmpty(value)) 171return ADP.InvalidOperation(value, inner); 177return ADP.Argument(SR.Format(SR.OleDb_SchemaRowsetsNotSupported, "IDBSchemaRowset", provider)); 182if (!ADP.IsEmpty(provider)) 190ADP.TraceExceptionAsReturnValue(e); 195return ADP.DataAdapter(SR.OleDb_MDACNotAvailable, inner); 199return ADP.Argument(SR.OleDb_MSDASQLNotSupported); 203return ADP.DataAdapter(SR.Format(SR.OleDb_CommandTextNotSupported, provider), inner); 207return ADP.DataAdapter(SR.OleDb_PossiblePromptNotUserInteractive); 212return ADP.DataAdapter(SR.Format(SR.OleDb_ProviderUnavailable, provider), inner); 216return ADP.DataAdapter(SR.Format(SR.OleDb_TransactionsNotSupported, provider), inner); 220return ADP.Argument(SR.OleDb_AsynchronousNotSupported); 224return ADP.Argument(SR.OleDb_NoProviderSpecified); 228return ADP.Argument(SR.OleDb_InvalidProviderSpecified); 232return ADP.Argument(SR.OleDb_InvalidRestrictionsDbInfoKeywords, parameter); 236return ADP.Argument(SR.OleDb_InvalidRestrictionsDbInfoLiteral, parameter); 240return ADP.Argument(SR.OleDb_InvalidRestrictionsSchemaGuids, parameter); 244return ADP.Argument(SR.Format(SR.OleDb_NotSupportedSchemaTable, OleDbSchemaGuid.GetTextFromValue(schema), connection.Provider)); 250return ADP.InvalidEnumerationValue(typeof(OleDbType), (int)value); 256return ADP.DataAdapter(SR.OleDb_BadAccessor); 260return ADP.InvalidCast(); 264return ADP.InvalidCast(SR.OleDb_CantConvertValue); 268return ADP.DataAdapter(SR.Format(SR.OleDb_SignMismatch, type.Name)); 272return ADP.DataAdapter(SR.Format(SR.OleDb_DataOverflow, type.Name)); 276return ADP.DataAdapter(SR.Format(SR.OleDb_CantCreate, type.Name)); 280return ADP.DataAdapter(SR.Format(SR.OleDb_Unavailable, type.Name)); 284return ADP.DataAdapter(SR.Format(SR.OleDb_UnexpectedStatusValue, status.ToString())); 288return ADP.DataAdapter(SR.Format(SR.OleDb_GVtUnknown, wType.ToString("X4", CultureInfo.InvariantCulture), wType.ToString(CultureInfo.InvariantCulture))); 292return ADP.DataAdapter(SR.Format(SR.OleDb_SVtUnknown, wType.ToString("X4", CultureInfo.InvariantCulture), wType.ToString(CultureInfo.InvariantCulture))); 298return ADP.DataAdapter(SR.Format(SR.OleDb_BadStatusRowAccessor, i.ToString(CultureInfo.InvariantCulture), rowStatus.ToString())); 302return ADP.InvalidOperation(SR.OleDb_ThreadApartmentState, innerException); 308return ADP.Argument(SR.OleDb_Fill_NotADODB, parameter); 312return ADP.Argument(SR.Format(SR.OleDb_Fill_EmptyRecordSet, "IRowset"), parameter, innerException); 316return ADP.Argument(SR.OleDb_Fill_EmptyRecord, parameter, innerException); 334return ADP.InvalidOperation(SR.OleDb_DBBindingGetVector); 340if (((int)hr < 0) && ADP.IsEmpty(message)) 344if (ADP.IsEmpty(message)) 354throw ADP.Argument(SR.OleDb_ISourcesRowsetNotSupported); 360return ADP.InvalidOperation(SR.OleDb_IDBInfoNotSupported);
OleDbCommand.cs (20)
23private int _commandTimeout = ADP.DefaultCommandTimeout; 120if (0 != ADP.SrcCompare(_commandText, value)) 138throw ADP.InvalidCommandTimeout(value); 150if (ADP.DefaultCommandTimeout != _commandTimeout) 153_commandTimeout = ADP.DefaultCommandTimeout; 177throw ADP.InvalidCommandType(value); 349throw ADP.InvalidUpdateRowSource(value); 614return ExecuteReaderInternal(behavior, ADP.ExecuteReader)!; 658throw ADP.InvalidCommandType(CommandType); 741if (!ADP.IsCatchableExceptionType(e)) 769if (!ADP.IsCatchableExceptionType(e)) 944ExecuteReaderInternal(CommandBehavior.Default, ADP.ExecuteNonQuery); 945return ADP.IntPtrToInt32(_recordsAffected); 952using (OleDbDataReader reader = ExecuteReaderInternal(CommandBehavior.Default, ADP.ExecuteScalar)!) 1028_recordsAffected = ADP.RecordsUnaffected; 1035if (ADP.IsEmpty(cmdtxt)) 1055_ => throw ADP.InvalidCommandType(cmdtype), 1190ValidateConnectionAndTransaction(ADP.Prepare); 1365throw ADP.ConnectionRequired(method); 1376throw ADP.OpenReaderExists();
OleDbCommandBuilder.cs (27)
109throw ADP.ArgumentNull("command"); 114throw ADP.DeriveParametersNotSupported(command); 119throw ADP.DeriveParametersNotSupported(command); 121throw ADP.InvalidCommandType(command.CommandType); 123if (ADP.IsEmpty(command.CommandText)) 125throw ADP.CommandTextRequired(ADP.DeriveParameters); 130throw ADP.ConnectionRequired(ADP.DeriveParameters); 135throw ADP.OpenConnectionRequired(ADP.DeriveParameters, state); 158connection.GetLiteralQuotes(ADP.DeriveParameters, out quotePrefix, out quoteSuffix); 163throw ADP.NoStoredProcedureExists(command.CommandText); 325throw ADP.NoStoredProcedureExists(command.CommandText); 335throw ADP.NoStoredProcedureExists(command.CommandText); 363ADP.CheckArgumentNull(unquotedIdentifier, "unquotedIdentifier"); 369if (ADP.IsEmpty(quotePrefix)) 378throw ADP.QuotePrefixNotSet(ADP.QuoteIdentifier); 381connection.GetLiteralQuotes(ADP.QuoteIdentifier, out quotePrefix, out quoteSuffix); 387return ADP.BuildQuotedString(quotePrefix, quoteSuffix, unquotedIdentifier); 410ADP.CheckArgumentNull(quotedIdentifier, "quotedIdentifier"); 416if (ADP.IsEmpty(quotePrefix)) 425throw ADP.QuotePrefixNotSet(ADP.UnquoteIdentifier); 428connection.GetLiteralQuotes(ADP.UnquoteIdentifier, out quotePrefix, out quoteSuffix); 437ADP.RemoveStringQuotes(quotePrefix, quoteSuffix, quotedIdentifier, out unquotedIdentifier);
OleDbConnection.cs (12)
82value = (null != constr) ? constr.ConnectTimeout : ADP.DefaultConnectionTimeout; 90return ADP.DefaultConnectionTimeout; 326CheckStateOpen(ADP.ChangeDatabase); 329throw ADP.EmptyDatabaseName(); 339throw ADP.OpenConnectionRequired(method, state); 430CheckStateOpen(ADP.GetOleDbSchemaTable); 507if (!ADP.IsCatchableOrSecurityExceptionType(e)) 512ADP.TraceExceptionWithoutRethrow(e); 524&& ADP.NeedManualEnlistment()) 532CheckStateOpen(ADP.SetProperties); 606e = ADP.OpenReaderExists(e); 633ADP.TraceExceptionAsReturnValue(e);
OleDbConnectionFactory.cs (2)
44Debug.Assert(!ADP.IsEmpty(connectionString), "null connectionString"); 86XMLStream = ADP.GetXmlStreamFromValues(values, metaDataXML!);
OleDbConnectionInternal.cs (11)
251throw ADP.NotSupported(); 259throw ADP.ParallelTransactionsNotSupported(outerConnection); 324throw ADP.LocalTransactionPresent(); 331SysTx.IDtcTransaction? oleTxTransaction = ADP.GetOletxTransaction(transaction); 601IntPtr ptr = ADP.IntPtrOffset(schemaGuids, i * ODB.SizeOf_Guid); 726if (!ADP.IsCatchableExceptionType(e)) 755ADP.CheckVersionMDAC(false); 790throw ADP.TransactionRequired(method); 799throw ADP.TransactionConnectionMismatch(); 802throw ADP.TransactionCompleted(); 815throw ADP.TransactionConnectionMismatch();
OleDbConnectionString.cs (24)
93PossiblePrompt = ((!ADP.IsEmpty(prompt) && (!string.Equals(prompt, VALUES.NoPrompt, StringComparison.OrdinalIgnoreCase))) 94|| !ADP.IsEmpty(this[KEY.WindowHandle])); 105if (!ADP.IsEmpty(udlFileName)) 107udlFileName = ADP.GetFullPath(udlFileName); 113if (!ADP.IsEmpty(udlConnectionString)) 119if (validate || ADP.IsEmpty(udlConnectionString)) 128get { return base.ConvertValueToInt32(KEY.Connect_Timeout, ADP.DefaultConnectionTimeout); } 145Debug.Assert(!ADP.IsEmpty(this[KEY.Provider]), "no Provider"); 231object? value = ADP.LocalMachineRegistryValue(UDL.Location, UDL.Pooling); 254Debug.Assert(!ADP.IsEmpty(udlfilename), "empty filename didn't fail"); 258Debug.Assert(udlfilename == ADP.GetFullPath(udlfilename), "only cache full path filenames"); 302int hdrlength = ADP.CharSize * UDL.Header.Length; 306if (length < hdrlength || (0 != length % ADP.CharSize)) 308failure = ADP.InvalidUDL(); 316failure = ADP.InvalidUDL(); 320failure = ADP.InvalidUDL(); 334if (!ADP.IsCatchableExceptionType(e)) 339throw ADP.UdlFileError(e); 358throw ADP.InvalidConnectTimeoutValue(); 388bool hasOleDBServices = (base.ContainsKey(KEY.Ole_DB_Services) && !ADP.IsEmpty((string?)base[KEY.Ole_DB_Services])); 391string? classid = (string?)ADP.ClassesRootRegistryValue(progid + "\\CLSID", string.Empty); 400object? tmp = ADP.ClassesRootRegistryValue("CLSID\\{" + classidProvider.ToString("D", CultureInfo.InvariantCulture) + "}", ODB.OLEDB_SERVICES); 412ADP.TraceExceptionWithoutRethrow(e); 436if (ADP.IsEmpty(progid))
OleDbConnectionStringBuilder.cs (15)
67if (!ADP.IsEmpty(connectionString)) 78ADP.CheckArgumentNull(keyword, "keyword"); 97ADP.CheckArgumentNull(keyword, "keyword"); 122throw ADP.KeywordNotSupported(keyword); 273ADP.CheckArgumentNull(keyword, "keyword"); 317throw ADP.KeywordNotSupported(s_validKeywords[(int)index]); 323ADP.CheckArgumentNull(keyword, "keyword"); 361throw ADP.KeywordNotSupported(s_validKeywords[(int)index]); 387ADP.CheckArgumentNull(value, keyword); 393ADP.CheckArgumentNull(keyword, "keyword"); 420if (!ADP.IsEmpty(provider)) 518ADP.TraceExceptionWithoutRethrow(e); 522ADP.TraceExceptionWithoutRethrow(e); 526ADP.TraceExceptionWithoutRethrow(e); 718throw ADP.ArgumentNull("destinationType");
OleDbDataAdapter.cs (11)
124OleDbRowUpdatingEventHandler? d = (OleDbRowUpdatingEventHandler?)ADP.FindBuilder(handler); 160throw ADP.ArgumentNull("dataTable"); 164throw ADP.ArgumentNull("adodb"); 173throw ADP.ArgumentNull("dataSet"); 177throw ADP.ArgumentNull("adodb"); 179if (ADP.IsEmpty(srcTable)) 181throw ADP.FillRequiresSourceTableName("srcTable"); 323if (!ADP.IsCatchableExceptionType(e)) 343dataReader.InitializeIRowset(result, chapterHandle, ADP.RecordsUnaffected); 377if (!ADP.IsCatchableExceptionType(e)) 394dataReader.InitializeIRow(result, ADP.RecordsUnaffected);
OleDbDataReader.cs (44)
53private IntPtr _recordsAffected = ADP.RecordsUnaffected; 140throw ADP.DataReaderClosed("Depth"); 152throw ADP.DataReaderClosed("FieldCount"); 165throw ADP.DataReaderClosed("HasRows"); 192return ADP.IntPtrToInt32(_recordsAffected); 273throw ADP.DataReaderClosed("GetSchemaTable"); 505Marshal.PtrToStructure(ADP.IntPtrOffset(columnInfos, offset), dbColumnInfo); 837throw ADP.InvalidSourceBufferIndex(0, dataIndex, "dataIndex"); 846throw ADP.NonSeqByteAccess(dataIndex, _sequentialBytesRead, method); 855ColumnBinding binding = DoSequentialCheck(ordinal, dataIndex, ADP.GetBytes); 866throw ADP.InvalidSourceBufferIndex(value.Length, srcIndex, "dataIndex"); 870throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex"); 880throw ADP.InvalidDataLength(length); 891ColumnBinding binding = DoSequentialCheck(ordinal, dataIndex, ADP.GetChars); 903throw ADP.InvalidSourceBufferIndex(value.Length, srcIndex, "dataIndex"); 907throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex"); 917throw ADP.InvalidDataLength(length); 929throw ADP.NotSupported(); 966reader.InitializeIRowset(result, chapterHandle, ADP.RecordsUnaffected); 984throw ADP.DataReaderNoData(); 1018throw ADP.DataReaderNoData(); 1058throw ADP.DataReaderNoData(); 1067throw ADP.DataReaderNoData(); 1090throw ADP.DataReaderNoData(); 1094throw ADP.NonSequentialColumnAccess(ordinal, _nextValueForRetrieval); 1137throw ADP.DataReaderNoData(); 1157throw ADP.ArgumentNull("values"); 1206throw ADP.DataReaderClosed("VisibleFieldCount"); 1223recordsAffected = ADP.RecordsUnaffected; 1304throw ADP.DataReaderClosed("NextResult"); 1392throw ADP.DataReaderClosed("Read"); 1946else if ((0 != ADP.SrcCompare(baseTableName, info.baseTableName)) 1947|| (0 != ADP.SrcCompare(baseCatalogName, catalogName)) 1948|| (0 != ADP.SrcCompare(baseSchemaName, schemaName))) 1967baseCatalogName = ADP.IsEmpty(baseCatalogName) ? null : baseCatalogName; 1968baseSchemaName = ADP.IsEmpty(baseSchemaName) ? null : baseSchemaName; 1975_connection.GetLiteralQuotes(ADP.GetSchemaTable, out s, out p); 1993if (!ADP.IsEmpty(basecolumname)) 2001if (!ADP.IsEmpty(basecolumname)) 2042if (!ADP.IsCatchableExceptionType(e)) 2047ADP.TraceExceptionWithoutRethrow(e); 2105if (!ADP.IsCatchableExceptionType(e)) 2110ADP.TraceExceptionWithoutRethrow(e); 2324info.size = ADP.IntPtrToInt32((nint)columnsize.columnBinding.Value_UI8());
OleDbEnumerator.cs (1)
76dataReader.InitializeIRowset(value, ChapterHandle.DB_NULL_HCHAPTER, ADP.RecordsUnaffected);
OleDbError.cs (2)
36if ((hr < 0) && ADP.IsEmpty(this.message)) 55if ((hr < 0) && ADP.IsEmpty(this.source))
OleDbException.cs (2)
97if (ADP.IsEmpty(message)) 137throw ADP.ArgumentNull("destinationType");
OleDbMetaDataFactory.cs (33)
58throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.MetaDataCollections); 80throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.MetaDataCollections, _populationMechanism); 85throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.MetaDataCollections, _collectionName); 93throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.Restrictions, _collectionName); 100if (ADP.IsEmpty(populationMechanismValue)) 102throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.MetaDataCollections, _populationMechanism); 105if (ADP.IsEmpty(collectionNameValue)) 107throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.MetaDataCollections, _collectionName); 150if (ADP.IsEmpty(restrictionCollectionNameValue)) 152throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.Restrictions, _collectionName); 183ADP.EscapeSpecialCharacters(invalidStartingChars, regularExpression); 185ADP.EscapeSpecialCharacters(invalidChars, regularExpression); 197throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.DataSourceInformation); 206throw ADP.IncorrectNumberOfDataSourceInformationRows(); 218ADP.EscapeSpecialCharacters(catalogSeparatorPattern, patternEscaped); 224ADP.EscapeSpecialCharacters(schemaSeparatorPattern, patternEscaped); 232ADP.EscapeSpecialCharacters(schemaSeparatorPattern, patternEscaped); 318connection.GetLiteralQuotes(ADP.GetSchema, out quotePrefix, out quoteSuffix); 331ADP.EscapeSpecialCharacters(quoteSuffix, scratchStringBuilder); 335ADP.EscapeSpecialCharacters(quotePrefix, scratchStringBuilder); 358throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.DataTypes); 477throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.ReservedWords); 486throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.ReservedWords); 504if (!ADP.IsEmptyArray(restrictions)) 506throw ADP.TooManyRestrictions(DbMetaDataCollectionNames.DataSourceInformation); 512if (!ADP.IsEmptyArray(restrictions)) 514throw ADP.TooManyRestrictions(DbMetaDataCollectionNames.DataTypes); 520if (!ADP.IsEmptyArray(restrictions)) 522throw ADP.TooManyRestrictions(DbMetaDataCollectionNames.ReservedWords); 552throw ADP.TooManyRestrictions(collectionName); 597throw ADP.InvalidRestrictionValue(collectionName, "TYPE", restrictions[indexRestrictionTypeSlot]!); 636throw ADP.InvalidRestrictionValue(collectionName, "PROCEDURE_TYPE", restrictions[procedureRestrictionTypeSlot]!); 652throw ADP.UnableToBuildCollection(collectionName);
OleDbParameter.cs (11)
359if (!ShouldSerializeSize() && ADP.IsDirection(this, ParameterDirection.Output)) 361throw ADP.UninitializedParameterSize(index, _coerceMetaType.dataType!); 423throw ADP.InvalidSizeValue(size); 489if (!ADP.IsCatchableExceptionType(e)) 494throw ADP.ParameterConversionFailed(value, destinationType.dataType!, e); 506if (ADP.IsNull(value)) 548throw ADP.PrepareParameterType(cmd); 552throw ADP.PrepareParameterSize(cmd); 556throw ADP.PrepareParameterScale(cmd, _metaType.wType.ToString("G", CultureInfo.InvariantCulture)); 643throw ADP.ArgumentNull("destinationType"); 664if (!ADP.IsEmpty(p.SourceColumn))
OleDbParameterCollectionHelper.cs (13)
85throw ADP.ArgumentNull(nameof(values)); 103throw ADP.ParametersSourceIndex(parameterName, this, s_itemType); 149throw ADP.ParametersSourceIndex(parameterName, this, s_itemType); 172if (0 == ADP.DstCompare(parameterName, parameter.ParameterName)) 223throw ADP.ParametersMappingIndex(index, this); 238throw ADP.CollectionRemoveInvalidObject(s_itemType, this); 289throw ADP.ParametersSourceIndex(parameterName, this, s_itemType); 298throw ADP.ParameterNull(nameof(value), this, s_itemType); 306throw ADP.ParametersIsNotParent(s_itemType, this); 310throw ADP.ParametersIsParent(s_itemType, this); 320name = ADP.Parameter + index.ToString(CultureInfo.CurrentCulture); 331throw ADP.ParameterNull(nameof(value), this, s_itemType); 335throw ADP.InvalidParameterType(this, s_itemType, value);
OleDbTransaction.cs (6)
136throw ADP.InvalidIsolationLevel(isolevel); 163throw ADP.TransactionZombied(this); 181throw ADP.TransactionZombied(this); 185throw ADP.ParallelTransactionsNotSupported(Connection!); 229throw ADP.TransactionZombied(this); 309throw ADP.TransactionZombied(this);
PropertyIDSet.cs (3)
25IntPtr ptr = ADP.IntPtrOffset(base.handle, PropertyIDSetSize); 30ptr = ADP.IntPtrOffset(base.handle, ODB.OffsetOf_tagDBPROPIDSET_PropertySet); 43IntPtr ptr = ADP.IntPtrOffset(base.handle, (i * PropertyIDSetSize) + ODB.OffsetOf_tagDBPROPIDSET_PropertySet);
PropertyInfoSet.cs (3)
74for (int i = 0; i < setCount; ++i, setPtr = ADP.IntPtrOffset(setPtr, ODB.SizeOf_tagDBPROPINFOSET)) 80for (int k = 0; k < infoCount; ++k, infoPtr = ADP.IntPtrOffset(infoPtr, ODB.SizeOf_tagDBPROPINFO)) 127IntPtr valuePtr = ADP.IntPtrOffset(infoPtr, (k * ODB.SizeOf_tagDBPROPINFO) + ODB.OffsetOf_tagDBPROPINFO_Value);
RowBinding.cs (12)
81return ADP.IntPtrOffset(DangerousGetHandle(), _headerLength); 91return ADP.IntPtrOffset(DangerousGetHandle(), valueOffset); 137IntPtr ptr = ADP.IntPtrOffset(buffer, (i * ODB.SizeOf_tagDBBINDING)); 182IntPtr buffer = ADP.IntPtrOffset(DangerousGetHandle(), offset); 211IntPtr buffer = ADP.IntPtrOffset(DangerousGetHandle(), offset); 222NativeOledbWrapper.MemoryCopy(ADP.IntPtrOffset(buffer, ODB.SizeOf_Variant), buffer, ODB.SizeOf_Variant); 286pinnedValue = ADP.IntPtrOffset(base.handle, _emptyStringOffset); 399IntPtr ptr = ADP.IntPtrOffset(buffer, (i * ODB.SizeOf_tagDBBINDING)); 472IntPtr chapter = SafeNativeMethods.InterlockedExchangePointer(ADP.IntPtrOffset(buffer, valueOffset), IntPtr.Zero); 541IntPtr currentHandle = ADP.IntPtrOffset(buffer, valueOffset); 542IntPtr originalHandle = ADP.IntPtrOffset(buffer, valueOffset + sizeof(ComVariant)); 577IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
src\runtime\src\libraries\Common\src\System\Data\Common\MultipartIdentifier.cs (10)
54throw ADP.InvalidMultipartNameToManyParts(property, name, limit); 68throw ADP.InvalidMultipartNameToManyParts(property, name, limit); 73throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name); 116throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name); 138throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name); 143throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name); 222throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name); 243throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name); 266throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name); 273throw ADP.InvalidMultipartName(property, name); // Name is entirely made up of whitespace
System\Data\Common\AdapterUtil.cs (35)
52Debug.Assert(ADP.IsCatchableExceptionType(e), "Invalid exception type, should have been re-thrown!"); 57Debug.Assert(ADP.IsCatchableExceptionType(e), "Invalid exception type, should have been re-thrown!"); 257return ADP.ArgumentOutOfRange(SR.GetString(SR.ADP_InvalidEnumerationValue, type.Name, value.ToString(System.Globalization.CultureInfo.InvariantCulture)), type.Name); 368return ADP.InvalidOperation(SR.GetString(SR.ADP_InvalidDataDirectory)); 380return ADP.Argument(SR.GetString(SR.SqlConvert_ConvertFailed, fromType.FullName!, toType.FullName!), innerException); 438return ADP.InvalidOperation(SR.GetString(SR.ADP_PooledOpenTimeout)); 443return ADP.TimeoutException(SR.GetString(SR.ADP_NonPooledOpenTimeout)); 501return InvalidOperation(SR.GetString(SR.ADP_OpenConnectionRequired, method, ADP.ConnectionStateMsg(state))); 549return Argument(SR.GetString(SR.ADP_InvalidCommandTimeout, value.ToString(CultureInfo.InvariantCulture)), ADP.CommandTimeout); 582return InvalidOperation(SR.GetString(SR.ADP_ConnectionAlreadyOpen, ADP.ConnectionStateMsg(state))); 594return InvalidOperation(SR.GetString(SR.ADP_OpenConnectionPropertySet, property, ADP.ConnectionStateMsg(state))); 752return CollectionIndexString(parameterType, ADP.ParameterName, parameterName, collection.GetType()); 801return ADP.Argument(SR.GetString(SR.MDF_InvalidRestrictionValue, collectionName, restrictionName, restrictionValue)); 927internal static readonly bool IsPlatformNT5 = (ADP.IsWindowsNT && (Environment.OSVersion.Version.Major >= 5)); 989if (!ADP.IsEmpty(quotePrefix)) 995if (!ADP.IsEmpty(quoteSuffix)) 1046throw ADP.ConfigWrongNumberOfValues(errorString); 1048return ADP.GetXmlStream(values[0], errorString); 1062throw ADP.ConfigUnableToLoadXmlMetaDataFile(errorString); 1071if (ADP.GetFullPath(fullPath) != fullPath) 1073throw ADP.ConfigUnableToLoadXmlMetaDataFile(errorString); 1078XmlStream = ADP.GetFileStream(fullPath); 1083if (!ADP.IsCatchableExceptionType(e)) 1087throw ADP.ConfigUnableToLoadXmlMetaDataFile(errorString); 1107ADP.TraceExceptionWithoutRethrow(e); 1125ADP.TraceExceptionWithoutRethrow(e); 1138version = (string?)ADP.LocalMachineRegistryValue("Software\\Microsoft\\DataAccess", "FullInstallVer"); 1139if (ADP.IsEmpty(version)) 1141string filename = (string)ADP.ClassesRootRegistryValue(System.Data.OleDb.ODB.DataLinks_CLSID, string.Empty)!; 1142FileVersionInfo versionInfo = ADP.GetVersionInfo(filename); 1160if (!ADP.IsCatchableExceptionType(e)) 1174throw ADP.DataAdapter(SR.GetString(SR.Odbc_MDACWrongVersion, version)); 1178throw ADP.DataAdapter(SR.GetString(SR.OleDb_MDACWrongVersion, version)); 1283return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, ADP.compareOptions); 1304throw ADP.InvalidParameterDirection(value);
System\Data\Common\FieldNameLookup.cs (3)
43throw ADP.ArgumentNull("fieldName"); 48throw ADP.IndexOutOfRange(fieldName); 84index = LinearIndexOf(fieldName, ADP.compareOptions);
System\Data\Common\NameValuePair.cs (2)
42throw ADP.InternalError(ADP.InternalErrorCode.NameValuePairNext);
System\Data\ProviderBase\DbBuffer.cs (13)
71IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 130IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 163IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 222IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 274IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 369IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 419IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 445IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 500IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 550IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 711throw ADP.NumericToDecimalOverflow(); 742throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer);
System\Data\ProviderBase\DbConnectionClosed.cs (11)
22throw ADP.ClosedConnectionError(); 28throw ADP.ClosedConnectionError(); 33throw ADP.ClosedConnectionError(); 43throw ADP.ClosedConnectionError(); 48throw ADP.ClosedConnectionError(); 53throw ADP.ClosedConnectionError(); 58throw ADP.ClosedConnectionError(); 75throw ADP.ConnectionAlreadyOpen(State); 123throw ADP.ConnectionAlreadyOpen(State); 132throw ADP.InternalConnectionError(ADP.ConnectionError.GetConnectionReturnsNull);
System\Data\ProviderBase\DbConnectionFactory.cs (12)
64throw ADP.NotSupported(); 189Transactions.Transaction? originalTransaction = ADP.GetCurrentTransaction(); 192ADP.SetCurrentTransaction(retry.Task.AsyncState as Transactions.Transaction); 203ADP.SetCurrentTransaction(originalTransaction); 224retry.TrySetException(ADP.ExceptionWithStackTrace(ADP.NonPooledOpenTimeout())); 266throw ADP.PooledOpenTimeout(); 283throw ADP.PooledOpenTimeout(); 324if (ADP.IsEmpty(key.ConnectionString)) 340throw ADP.InternalConnectionError(ADP.ConnectionError.ConnectionOptionsMissing); 360if ((null == poolOptions) && ADP.IsWindowsNT)
System\Data\ProviderBase\DbConnectionHelper.cs (5)
31ADP.CheckArgumentNull(connection, "connection"); 107throw ADP.OpenConnectionPropertySet(ADP.ConnectionString, connectionInternal.State); 214throw ADP.TransactionPresent(); 257throw ADP.NoConnectionString();
System\Data\ProviderBase\DbConnectionInternal.Shared.cs (23)
297throw ADP.InternalError(ADP.InternalErrorCode.CreateReferenceCollectionReturnedNull); 327throw ADP.InternalError(ADP.InternalErrorCode.AttemptingToConstructReferenceCollectionOnStaticObject); 382throw ADP.InternalError(ADP.InternalErrorCode.PooledObjectWithoutPool); // pooled connection does not have a pool 464throw ADP.InternalError(ADP.InternalErrorCode.SynchronousConnectReturnedPending); 475throw ADP.ConnectionAlreadyOpen(State); 501throw ADP.InternalConnectionError(ADP.ConnectionError.GetConnectionReturnsNull); 523throw ADP.InternalError(ADP.InternalErrorCode.UnpooledObjectHasOwner); // new unpooled object has an owner 528throw ADP.InternalError(ADP.InternalErrorCode.UnpooledObjectHasWrongOwner); // unpooled object has incorrect owner 532throw ADP.InternalError(ADP.InternalErrorCode.PushingObjectSecondTime); // pushing object onto stack a second time 558throw ADP.InternalError(ADP.InternalErrorCode.PooledObjectHasOwner); // pooled connection already has an owner! 567throw ADP.InternalError(ADP.InternalErrorCode.PooledObjectInPoolMoreThanOnce); // popping object off stack with multiple pooledCount 572throw ADP.InternalError(ADP.InternalErrorCode.NonPooledObjectUsedMoreThanOnce); // popping object off stack with multiple pooledCount
System\Data\ProviderBase\DbConnectionPool.cs (20)
376Debug.Assert(ADP.IsWindowsNT, "Attempting to construct a connection pool on Win9x?"); 381throw ADP.InternalError(ADP.InternalErrorCode.AttemptingToPoolOnRestrictedToken); 403if (ADP.IsPlatformNT5) 662throw ADP.InternalError(ADP.InternalErrorCode.CreateObjectReturnedNull); // CreateObject succeeded, but null object 666throw ADP.InternalError(ADP.InternalErrorCode.NewObjectCannotBePooled); // CreateObject succeeded, but non-poolable object 702if (!ADP.IsCatchableExceptionType(e)) 707ADP.TraceExceptionForCapture(e); 967delay = (uint)Math.Max(ADP.TimerRemainingMilliseconds(next.DueTime), 0); 979ADP.SetCurrentTransaction(next.Completion.Task.AsyncState as Transactions.Transaction); 1008next.Completion.TrySetException(ADP.ExceptionWithStackTrace(ADP.PooledOpenTimeout())); 1067CreationTimeout == 0 ? Timeout.Infinite : ADP.TimerCurrent() + ADP.TimerFromSeconds(CreationTimeout / 1000), 1252throw ADP.InternalError(ADP.InternalErrorCode.UnexpectedWaitAnyResult); 1364transaction = ADP.GetCurrentTransaction(); 1488if (!ADP.IsCatchableExceptionType(e))
System\Data\ProviderBase\DbConnectionPoolCounters.cs (8)
97if (ADP.IsPlatformNT5) 101if (!ADP.IsEmpty(categoryName) && !ADP.IsEmpty(instanceName)) 115ADP.TraceExceptionWithoutRethrow(e); 169if (!ADP.IsEmpty(categoryName)) 171if (ADP.IsPlatformNT5) 192if (!ADP.IsEmpty(categoryName)) 230if (ADP.IsEmpty(instanceName))
System\Data\ProviderBase\DbConnectionPoolGroup.cs (2)
48Debug.Assert(null == poolGroupOptions || ADP.IsWindowsNT, "should not have pooling options on Win9x"); 177Debug.Assert(ADP.IsWindowsNT, "should not be pooling on Win9x");
System\Data\ProviderBase\DbMetaDataFactory.cs (27)
38ADP.CheckArgumentNull(xmlStream, "xmlStream"); 39ADP.CheckArgumentNull(serverVersion, "serverVersion"); 40ADP.CheckArgumentNull(normalizedServerVersion, "normalizedServerVersion"); 85throw ADP.DataTableDoesNotExist(collectionName); 141throw ADP.TooManyRestrictions(collectionName); 178if (!ADP.IsCatchableExceptionType(e)) 182throw ADP.QueryFailed(collectionName, e); 227throw ADP.NoColumns(); 256throw ADP.InvalidXml(); 263throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.MetaDataCollections, DbMetaDataColumnNames.CollectionName); 277if (ADP.IsEmpty(candidateCollectionName)) 279throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.MetaDataCollections, DbMetaDataColumnNames.CollectionName); 282if (ADP.CompareInsensitiveInvariant(candidateCollectionName, collectionName)) 294throw ADP.CollectionNameIsNotUnique(collectionName); 319throw ADP.UndefinedCollection(collectionName); 323throw ADP.UnsupportedVersion(collectionName); 329throw ADP.AmbiguousCollectionName(collectionName); 344throw ADP.MissingDataSourceInformationColumn(); 349throw ADP.IncorrectNumberOfDataSourceInformationRows(); 384throw ADP.MissingRestrictionColumn(); 400throw ADP.MissingRestrictionRow(); 420if (!ADP.IsEmptyArray(restrictions)) 428throw ADP.NotSupported(); 448if (!ADP.IsEmptyArray(restrictions)) 450throw ADP.TooManyRestrictions(exactCollectionName); 474throw ADP.UndefinedPopulationMechanism(populationMechanism); 513throw ADP.NotSupported();