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