fx\src\data\System\Data\Common\AdapterUtil.cs (77)
112Debug.Assert(ADP.IsCatchableExceptionType(e), "Invalid exception type, should have been re-thrown!");
116Debug.Assert(ADP.IsCatchableExceptionType(e), "Invalid exception type, should have been re-thrown!");
409return ADP.ArgumentOutOfRange(Res.GetString(Res.ADP_InvalidEnumerationValue, type.Name, value.ToString(System.Globalization.CultureInfo.InvariantCulture)), type.Name);
413return ADP.ArgumentOutOfRange(Res.GetString(Res.ADP_NotSupportedEnumerationValue, type.Name, value, method), type.Name);
715return ADP.NotSupportedEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), value.ToString(), method);
780return ADP.InvalidOperation(Res.GetString(Res.ADP_InvalidDataDirectory));
789return ADP.Argument(Res.GetString(Res.ADP_InvalidMinMaxPoolSizeValues));
792return ADP.Argument(Res.GetString(Res.SqlConvert_ConvertFailed, fromType.FullName, toType.FullName), innerException);
796return ADP.InvalidOperation(Res.GetString(Res.ADP_InvalidMixedUsageOfSecureAndClearCredential));
800return ADP.Argument(Res.GetString(Res.ADP_InvalidMixedUsageOfSecureAndClearCredential));
804return ADP.InvalidOperation(Res.GetString(Res.ADP_InvalidMixedUsageOfSecureCredentialAndIntegratedSecurity));
808return ADP.Argument(Res.GetString(Res.ADP_InvalidMixedUsageOfSecureCredentialAndIntegratedSecurity));
813return ADP.InvalidOperation(Res.GetString(Res.ADP_InvalidMixedUsageOfSecureCredentialAndContextConnection));
818return ADP.Argument(Res.GetString(Res.ADP_InvalidMixedUsageOfSecureCredentialAndContextConnection));
822return ADP.InvalidOperation(Res.GetString(Res.ADP_InvalidMixedUsageOfAccessTokenAndContextConnection));
826return ADP.InvalidOperation(Res.GetString(Res.ADP_InvalidMixedUsageOfAccessTokenAndIntegratedSecurity));
830return ADP.InvalidOperation(Res.GetString(Res.ADP_InvalidMixedUsageOfAccessTokenAndUserIDPassword));
834return ADP.InvalidOperation(Res.GetString(Res.ADP_InvalidMixedUsageOfAccessTokenAndCredential));
838return ADP.InvalidOperation(Res.GetString(Res.ADP_InvalidMixedUsageOfAccessTokenAndAuthentication));
842return ADP.InvalidOperation(Res.GetString(Res.ADP_InvalidMixedUsageOfCredentialAndAccessToken));
924return ADP.InvalidOperation(Res.GetString(Res.ADP_PooledOpenTimeout));
928return ADP.TimeoutException(Res.GetString(Res.ADP_NonPooledOpenTimeout));
997if (ADP.IsEmpty(tableName)) {
1033return CollectionIndexString(typeof(DataColumnMapping), ADP.DataSetColumn, cacheColumn, typeof(DataColumnMappingCollection));
1039return CollectionIndexString(typeof(DataColumnMapping), ADP.SourceColumn, srcColumn, typeof(DataColumnMappingCollection));
1048return CollectionUniqueValue(typeof(DataColumnMapping), ADP.SourceColumn, srcColumn);
1064return CollectionIndexString(typeof(DataTableMapping), ADP.DataSetTable, cacheTable, typeof(DataTableMappingCollection));
1076return CollectionIndexString(typeof(DataTableMapping), ADP.SourceTable, srcTable, typeof(DataTableMappingCollection));
1079return CollectionUniqueValue(typeof(DataTableMapping), ADP.SourceTable, srcTable);
1101return InvalidOperation(Res.GetString(Res.ADP_OpenConnectionRequired, method, ADP.ConnectionStateMsg(state)));
1130throw ADP.InvalidStatementType(statementType);
1178throw ADP.InvalidStatementType(statementType);
1181return InvalidOperation(Res.GetString(resource, ADP.ConnectionStateMsg(state)));
1233return ADP.Argument(Res.GetString(Res.ADP_InvalidMetaDataValue));
1316throw ADP.InvalidStatementType(statementType);
1348throw ADP.InvalidStatementType(statementType);
1370return Argument(Res.GetString(Res.ADP_InvalidCommandTimeout, value.ToString(CultureInfo.InvariantCulture)), ADP.CommandTimeout);
1401return InvalidOperation(Res.GetString(Res.ADP_ConnectionAlreadyOpen, ADP.ConnectionStateMsg(state)));
1413return InvalidOperation(Res.GetString(Res.ADP_OpenConnectionPropertySet, property, ADP.ConnectionStateMsg(state)));
1582return ADP.Argument(Res.GetString(Res.ADP_ParameterValueOutOfRange, value.ToString((IFormatProvider)null)));
1585return ADP.Argument(Res.GetString(Res.ADP_ParameterValueOutOfRange, value.ToString()));
1589return ADP.Argument(Res.GetString(Res.ADP_ParameterValueOutOfRange, value));
1627return CollectionIndexString(parameterType, ADP.ParameterName, parameterName, collection.GetType());
1675return ADP.Argument(Res.GetString(Res.MDF_InvalidRestrictionValue, collectionName, restrictionName, restrictionValue));
1764return ADP.InvalidOperation(Res.GetString(Res.ADP_UnableToCreateBooleanLiteral));
1880static internal readonly bool IsPlatformNT5 = (ADP.IsWindowsNT && (Environment.OSVersion.Version.Major >= 5));
1984if (ADP.IsEmpty(quotePrefix) == false) {
1989if (ADP.IsEmpty(quoteSuffix) == false) {
2004throw ADP.LiteralValueIsInvalid(dataTypeName);
2015throw ADP.LiteralValueIsInvalid(dataTypeName);
2050if (ADP.IsEmpty(decimalSeparator) == true) {
2088throw ADP.ComputerNameEx(getComputerNameExError);
2094throw ADP.ComputerNameEx(Marshal.GetLastWin32Error());
2102value = ADP.MachineName();
2137throw ADP.ConfigWrongNumberOfValues(errorString);
2139return ADP.GetXmlStream(values[0],errorString);
2154throw ADP.ConfigUnableToLoadXmlMetaDataFile(errorString);
2163if (ADP.GetFullPath(fullPath) != fullPath) {
2164throw ADP.ConfigUnableToLoadXmlMetaDataFile(errorString);
2168XmlStream = ADP.GetFileStream(fullPath);
2172if (!ADP.IsCatchableExceptionType(e)) {
2175throw ADP.ConfigUnableToLoadXmlMetaDataFile(errorString);
2194ADP.TraceExceptionWithoutRethrow(e);
2214ADP.TraceExceptionWithoutRethrow(e);
2230version = (string)ADP.LocalMachineRegistryValue("Software\\Microsoft\\DataAccess", "FullInstallVer");
2231if (ADP.IsEmpty(version)) {
2232string filename = (string)ADP.ClassesRootRegistryValue(System.Data.OleDb.ODB.DataLinks_CLSID, ADP.StrEmpty);
2233FileVersionInfo versionInfo = ADP.GetVersionInfo(filename); // MDAC 60411
2249if (!ADP.IsCatchableExceptionType(e)) {
2260throw ADP.DataAdapter(Res.GetString(Res.Odbc_MDACWrongVersion, version));
2263throw ADP.DataAdapter(Res.GetString(Res.OleDb_MDACWrongVersion, version));
2410columnNameArray[i] = ADP.StrEmpty; // MDAC 66681
2446if (4 == ADP.PtrSize) {
2449Debug.Assert(8 == ADP.PtrSize, "8 != IntPtr.Size"); // MDAC 73747
2454if (4 == ADP.PtrSize) {
2471return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, ADP.compareOptions);
fx\src\data\System\Data\Common\DataRecordInternal.cs (13)
57throw ADP.ArgumentNull("values");
120throw ADP.InvalidSourceBufferIndex(cbytes, dataIndex, "dataIndex");
143if (ADP.IsCatchableExceptionType(e)) {
147throw ADP.InvalidDataLength(length);
151throw ADP.InvalidDestinationBufferIndex(length, bufferIndex, "bufferIndex");
155throw ADP.InvalidSourceBufferIndex(length, dataIndex, "dataIndex");
159throw ADP.InvalidBufferSizeOrIndex(cbytes, bufferIndex);
192throw ADP.InvalidSourceBufferIndex(cchars, dataIndex, "dataIndex");
215if (ADP.IsCatchableExceptionType(e)) {
219throw ADP.InvalidDataLength(length);
223throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex");
227throw ADP.InvalidSourceBufferIndex(cchars, dataIndex, "dataIndex");
231throw ADP.InvalidBufferSizeOrIndex(cchars, bufferIndex);
fx\src\data\System\Data\Common\DBCommandBuilder.cs (56)
171if (ADP.CompareInsensitiveInvariant(name, _baseParameterNames[j])) {
225if (ADP.CompareInsensitiveInvariant(_baseParameterNames[i], name)) {
317throw ADP.InvalidConflictOptions(value);
333throw ADP.NoQuoteChange();
341throw ADP.InvalidCatalogLocation(value);
358throw ADP.NoQuoteChange();
417return ((null != quotePrefix) ? quotePrefix : ADP.StrEmpty);
421throw ADP.NoQuoteChange();
435return ((null != quoteSuffix) ? quoteSuffix : ADP.StrEmpty);
439throw ADP.NoQuoteChange();
458throw ADP.NoQuoteChange();
516throw ADP.MissingSourceCommandConnection();
555throw ADP.DynamicSQLNoTableInfo();
577ADP.BuildSchemaTableInfoTableNames(srcColumnNames);
589throw ADP.DynamicSQLNoTableInfo();
623else if ( (0 != ADP.SrcCompare(baseTableName, tableName))
624|| (0 != ADP.SrcCompare(baseSchemaName, schemaName))
625|| (0 != ADP.SrcCompare(baseCatalogName, catalogName))
626|| (0 != ADP.SrcCompare(baseServerName, serverName))) {
627throw ADP.DynamicSQLJoinUnsupported();
643throw ADP.DynamicSQLNoTableInfo();
653if (!ADP.IsEmpty(quotePrefix) && (-1 != baseTableName.IndexOf(quotePrefix, StringComparison.Ordinal))) {
654throw ADP.DynamicSQLNestedQuote(baseTableName, quotePrefix);
656if (!ADP.IsEmpty(quoteSuffix) && (-1 != baseTableName.IndexOf(quoteSuffix, StringComparison.Ordinal))) {
657throw ADP.DynamicSQLNestedQuote(baseTableName, quoteSuffix);
664builder.Append(ADP.BuildQuotedString(quotePrefix, quoteSuffix, baseServerName));
668builder.Append(ADP.BuildQuotedString(quotePrefix, quoteSuffix, baseCatalogName));
674builder.Append(ADP.BuildQuotedString(quotePrefix, quoteSuffix, baseSchemaName));
678builder.Append(ADP.BuildQuotedString(quotePrefix, quoteSuffix, baseTableName));
684builder.Append(ADP.BuildQuotedString(quotePrefix, quoteSuffix, baseServerName));
688builder.Append(ADP.BuildQuotedString(quotePrefix, quoteSuffix, baseCatalogName));
708Debug.Assert (!ADP.IsEmpty(_quotedBaseTableName), "no table name");
728Debug.Assert (!ADP.IsEmpty(_quotedBaseTableName), "no table name");
814Debug.Assert (!ADP.IsEmpty(_quotedBaseTableName), "no table name");
995throw ADP.DynamicSQLNoKeyInfoRowVersionUpdate();
997throw ADP.DynamicSQLNoKeyInfoUpdate();
1001throw ADP.DynamicSQLNoKeyInfoRowVersionDelete();
1003throw ADP.DynamicSQLNoKeyInfoDelete();
1022Debug.Assert(!ADP.IsEmpty(sourceColumn), "empty source column");
1039p.Value = ADP.IsNull(value) ? DbDataAdapter.ParameterValueNullValue : DbDataAdapter.ParameterValueNonNullValue;
1163throw ADP.MissingSourceCommand();
1233if (!ADP.IsEmpty(columnName)) {
1270throw ADP.DynamicSQLNoKeyInfoRowVersionUpdate();
1272throw ADP.DynamicSQLNoKeyInfoUpdate();
1292throw ADP.InvalidConflictOptions(value);
1316return ADP.BuildQuotedString(QuotePrefix, QuoteSuffix, column);
1321throw ADP.NotSupported();
1365throw ADP.ArgumentNull("rowUpdatingEvent");
1387throw ADP.InvalidStatementType(stmtType);
1411if (!ADP.IsCatchableExceptionType(e)) {
1415ADP.TraceExceptionForCapture(e);
1445throw ADP.InvalidStatementType(rowUpdatingEvent.StatementType);
1457throw ADP.NotSupported();
1484if (!ADP.IsEmpty(name)) {
1485bool useQuotes = !ADP.IsEmpty(quotePrefix) && !ADP.IsEmpty(quoteSuffix);
fx\src\data\System\Data\Common\DbConnectionStringCommon.cs (20)
268throw ADP.ConvertFailed(value.GetType(), typeof(Boolean), e);
298throw ADP.ConvertFailed(value.GetType(), typeof(Boolean), e);
310throw ADP.ConvertFailed(value.GetType(), typeof(Int32), e);
322throw ADP.ConvertFailed(value.GetType(), typeof(String), e);
416throw ADP.InvalidConnectionOptionValue(keyword);
433throw ADP.ConvertFailed(value.GetType(), typeof(PoolBlockingPeriod), null);
446throw ADP.ConvertFailed(value.GetType(), typeof(PoolBlockingPeriod), e);
457throw ADP.InvalidEnumerationValue(typeof(ApplicationIntent), (int)eValue);
541throw ADP.InvalidConnectionOptionValue(keyword);
558throw ADP.ConvertFailed(value.GetType(), typeof(ApplicationIntent), null);
571throw ADP.ConvertFailed(value.GetType(), typeof(ApplicationIntent), e);
582throw ADP.InvalidEnumerationValue(typeof(ApplicationIntent), (int)eValue);
735throw ADP.InvalidConnectionOptionValue(keyword);
752throw ADP.ConvertFailed(value.GetType(), typeof(SqlAuthenticationMethod), null);
765throw ADP.ConvertFailed(value.GetType(), typeof(SqlAuthenticationMethod), e);
776throw ADP.InvalidEnumerationValue(typeof(SqlAuthenticationMethod), (int)eValue);
806throw ADP.InvalidConnectionOptionValue(keyword);
820throw ADP.ConvertFailed(value.GetType(), typeof(SqlConnectionColumnEncryptionSetting), null);
830throw ADP.ConvertFailed(value.GetType(), typeof(SqlConnectionColumnEncryptionSetting), e);
839throw ADP.InvalidEnumerationValue(typeof(SqlConnectionColumnEncryptionSetting), (int)eValue);
fx\src\data\System\Data\Common\DbDataAdapter.cs (75)
146throw ADP.NotSupported();
198throw ADP.NotSupported();
205throw ADP.NotSupported();
253throw ADP.NotSupported();
274if (DesignMode && ((null == command) || (null == command.Connection) || ADP.IsEmpty(command.CommandText))) {
303throw ADP.ArgumentNull("dataSet");
306throw ADP.InvalidSchemaType(schemaType);
308if (ADP.IsEmpty(srcTable)) {
309throw ADP.FillSchemaRequiresSourceTableName("srcTable");
312throw ADP.MissingSelectCommand(ADP.FillSchema);
325throw ADP.ArgumentNull("dataTable");
328throw ADP.InvalidSchemaType(schemaType);
331throw ADP.MissingSelectCommand(ADP.FillSchema);
348IDbConnection activeConnection = DbDataAdapter.GetConnection3(this, command, ADP.FillSchema);
422throw ADP.FillRequires("dataSet");
425throw ADP.InvalidStartRecord("startRecord", startRecord);
428throw ADP.InvalidMaxRecords("maxRecords", maxRecords);
430if (ADP.IsEmpty(srcTable)) {
431throw ADP.FillRequiresSourceTableName("srcTable");
434throw ADP.MissingSelectCommand(ADP.Fill);
490throw ADP.FillRequires("dataTable");
493throw ADP.InvalidStartRecord("startRecord", startRecord);
496throw ADP.InvalidMaxRecords("maxRecords", maxRecords);
499throw ADP.OnlyOneTableForStartRecordOrMaxRecords();
502throw ADP.MissingSelectCommand(ADP.Fill);
518IDbConnection activeConnection = DbDataAdapter.GetConnection3(this, command, ADP.Fill);
566throw ADP.NotSupported();
608throw ADP.MissingTableMappingDestination(dataTable.TableName);
619throw ADP.NotSupported();
636if (!ADP.IsEmpty(columnName)) {
650parameter.Value = ADP.IsNull(parameter.Value) ? ParameterValueNullValue : ParameterValueNonNullValue;
664if (!ADP.IsEmpty(columnName)) {
701throw ADP.NotSupported();
717throw ADP.ArgumentNull("dataRows");
724throw ADP.UpdateMismatchRowTable(i);
746throw ADP.UpdateRequiresDataTable("dataTable");
756throw ADP.MissingTableMappingDestination(dataTable.TableName);
771throw ADP.UpdateRequiresNonNullDataSet("dataSet");
773if (ADP.IsEmpty(srcTable)) {
774throw ADP.UpdateRequiresSourceTableName("srcTable");
795throw ADP.UpdateRequiresSourceTable(srcTable); // MDAC 72681
872throw ADP.InvalidDataRowState(dataRow.RowState); // out of Update without completing batch
888if (!ADP.IsCatchableExceptionType(e)) {
892ADP.TraceExceptionForCapture(e);
925throw ADP.InvalidUpdateStatus(rowUpdatingStatus); // out of Update
969errors = ADP.ResultsNotAllowedDuringBatch();
974errors = ADP.UpdateRequiresCommand(statementType, isCommandFromRowUpdating);
979if (!ADP.IsCatchableExceptionType(e)) {
983ADP.TraceExceptionForCapture(e);
1022rowUpdatedEvent.Errors = ADP.UpdateOpenConnectionRequired(StatementType.Batch, false, state);
1036rowUpdatedEvent.Errors = ADP.UpdateOpenConnectionRequired(statementType, isCommandFromRowUpdating, state);
1042rowUpdatedEvent.Errors = ADP.UpdateRequiresCommand(statementType, isCommandFromRowUpdating);
1048if (!ADP.IsCatchableExceptionType(e)) {
1052ADP.TraceExceptionForCapture(e);
1111rowUpdatedEvent.Errors = ADP.UpdateOpenConnectionRequired(StatementType.Batch, false, state);
1117if (!ADP.IsCatchableExceptionType(e)) {
1121ADP.TraceExceptionForCapture(e);
1164ADP.TraceExceptionForCapture(e);
1198batchCommands[bc].Errors = ADP.UpdateConcurrencyViolation(batchCommands[bc].StatementType, 0, 1, new DataRow[] { rowUpdatedEvent.Rows[bc] });
1230rowUpdatedEvent.Errors = ADP.UpdateConcurrencyViolation(StatementType.Batch, commandCount - rowsInError.Length, commandCount, rowsInError); // MDAC 55735
1259DataRow[] dataRows = ADP.SelectAdapterRows(dataTable, false);
1341rowUpdatedEvent.Errors = ADP.UpdateConcurrencyViolation(cmdIndex, rowUpdatedEvent.RecordsAffected, 1, new DataRow[] { rowUpdatedEvent.Row }); // MDAC 55735
1365throw ADP.InvalidUpdateStatus(rowUpdatedEvent.Status);
1404errors = ADP.RowUpdatedErrors();
1463errors = ADP.RowUpdatingErrors();
1490throw ADP.UpdateConnectionRequired(StatementType.Batch, false);
1497Debug.Assert(!ADP.IsEmpty(method), "missing method name");
1500throw ADP.ConnectionRequired_Res(method);
1509throw ADP.UpdateConnectionRequired(statementType, isCommandFromRowUpdating);
1520throw ADP.UnwantedStatementType(statementType);
1522throw ADP.InvalidStatementType(statementType);
fx\src\data\System\Data\Common\MultipartIdentifier.cs (10)
53throw ADP.InvalidMultipartNameToManyParts (property, name, limit);
65throw ADP.InvalidMultipartNameToManyParts (property, name, limit);
69throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes (property, name);
104throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes (property, name);
122throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes (property, name);
126throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes (property, name);
189throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes (property, name);
205throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes (property, name);
227throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes (property, name);
232throw ADP.InvalidMultipartName (property, name); // Name is entirely made up of whitespace
fx\src\data\System\Data\Odbc\Odbc32.cs (24)
24return ADP.InvalidOperation(Res.GetString(Res.Odbc_ConnectionClosed));
28return ADP.InvalidOperation(Res.GetString(Res.Odbc_OpenConnectionNoOwner));
32return ADP.Argument(Res.GetString(Res.Odbc_UnknownSQLType, sqltype.ToString()));
35return ADP.Argument(Res.GetString(Res.OdbcConnection_ConnectionStringTooLong, ODBC32.MAX_CONNECTION_STRING_LENGTH));
38return ADP.Argument(Res.GetString(Res.ODBC_GetSchemaRestrictionRequired));
41return ADP.ArgumentOutOfRange(Res.GetString(Res.ODBC_NotSupportedEnumerationValue, type.Name, value.ToString(System.Globalization.CultureInfo.InvariantCulture)), type.Name);
81return ADP.DataAdapter(Res.GetString(Res.Odbc_NoMappingForSqlTransactionLevel, value.ToString(CultureInfo.InvariantCulture)));
85return ADP.Argument(Res.GetString(Res.Odbc_NegativeArgument));
88return ADP.InvalidOperation(Res.GetString(Res.Odbc_CantSetPropertyOnOpenConnection));
91return ADP.DataAdapter(Res.GetString(Res.Odbc_CantEnableConnectionpooling, ODBC32.RetcodeToString(retcode)));
94return ADP.DataAdapter(Res.GetString(Res.Odbc_CantAllocateEnvironmentHandle, ODBC32.RetcodeToString(retcode)));
97return ADP.DataAdapter(Res.GetString(Res.Odbc_FailedToGetDescriptorHandle, ODBC32.RetcodeToString(retcode)));
100return ADP.InvalidOperation(Res.GetString(Res.Odbc_NotInTransaction));
103return ADP.InvalidEnumerationValue(typeof(OdbcType), (int) odbctype);
112return checked((short)ADP.StringLength(inputString));
270static internal readonly IntPtr SQL_AUTOCOMMIT_OFF = ADP.PtrZero;
575static internal readonly IntPtr SQL_HANDLE_NULL = ADP.PtrZero;
783static private readonly TypeMap _Decimal = new TypeMap(OdbcType.Decimal, DbType.Decimal, typeof(Decimal), ODBC32.SQL_TYPE.DECIMAL, ODBC32.SQL_C.NUMERIC, ODBC32.SQL_C.NUMERIC, 19, ADP.DecimalMaxPrecision28, false);
790static private readonly TypeMap _Numeric = new TypeMap(OdbcType.Numeric, DbType.Decimal, typeof(Decimal), ODBC32.SQL_TYPE.NUMERIC, ODBC32.SQL_C.NUMERIC, ODBC32.SQL_C.NUMERIC, 19, ADP.DecimalMaxPrecision28, false);
889default: throw ADP.DbTypeNotSupported(dbType, typeof(OdbcType));
895case TypeCode.Empty: throw ADP.InvalidDataType(TypeCode.Empty);
909throw ADP.UnknownDataType(dataType);
911case TypeCode.DBNull: throw ADP.InvalidDataType(TypeCode.DBNull);
932default: throw ADP.UnknownDataTypeCode(dataType, Type.GetTypeCode(dataType));
fx\src\data\System\Data\Odbc\OdbcConnectionHandle.cs (6)
38throw ADP.ArgumentNull("connection");
41throw ADP.ArgumentNull("constr");
115throw ADP.InvalidIsolationLevel(isolevel);
195retcode = UnsafeNativeMethods.SQLDriverConnectW(this, ADP.PtrZero, connectionString, ODBC32.SQL_NTS, ADP.PtrZero, 0, out cbActualSize, (short)ODBC32.SQL_DRIVER.NOPROMPT);
242ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetInfoW(this, info, buffer, checked((short)buffer.Length), ADP.PtrZero);
fx\src\data\System\Data\OleDb\DBPropSet.cs (21)
40if (ADP.PtrZero != base.handle) {
44if (ADP.PtrZero == base.handle) {
123if (ADP.PtrZero != ptr) {
129if(ADP.PtrZero != rgProperties) {
130int cProperties = Marshal.ReadInt32(ptr, offset + ADP.PtrSize);
132IntPtr vptr = ADP.IntPtrOffset(rgProperties, ODB.OffsetOf_tagDBPROP_Value);
133for (int k = 0; k < cProperties; ++k, vptr = ADP.IntPtrOffset(vptr, ODB.SizeOf_tagDBPROP)) {
156throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer, lastErrorFromProvider);
159throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer);
170IntPtr propertySetPtr = ADP.IntPtrOffset(DangerousGetHandle(), index * ODB.SizeOf_tagDBPROPSET);
177IntPtr ptr = ADP.IntPtrOffset(propset.rgProperties, i * ODB.SizeOf_tagDBPROP);
194throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer, lastErrorFromProvider);
197throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer);
211IntPtr propsetPtr = ADP.IntPtrOffset(DangerousGetHandle(), index * ODB.SizeOf_tagDBPROPSET);
217if (ADP.PtrZero != propset.rgProperties) {
226if (ADP.PtrZero == propset.rgProperties) {
232IntPtr propertyPtr = ADP.IntPtrOffset(propset.rgProperties, i * ODB.SizeOf_tagDBPROP);
fx\src\data\System\Data\OleDb\OLEDB_Enum.cs (7)
160static private readonly NativeDBType D_BSTR = new NativeDBType(0xff, ADP.PtrSize, false, false, OleDbType.BSTR, NativeDBType.BSTR, S_BSTR, typeof(System.String), NativeDBType.BSTR, DbType.String ); // 2 - integer4 (pointer)
175static private readonly NativeDBType D_IDispatch = new NativeDBType(0xff, ADP.PtrSize, true, false, OleDbType.IDispatch, NativeDBType.IDISPATCH, S_IDISPATCH, typeof(System.Object), NativeDBType.IDISPATCH, DbType.Object ); // 17 - integer4 (pointer)
176static private readonly NativeDBType D_IUnknown = new NativeDBType(0xff, ADP.PtrSize, true, false, OleDbType.IUnknown, NativeDBType.IUNKNOWN, S_IUNKNOWN, typeof(System.Object), NativeDBType.IUNKNOWN, DbType.Object ); // 18 - integer4 (pointer) // MDAC 64040
195static private readonly NativeDBType D_Chapter = new NativeDBType(0xff, ADP.PtrSize, false, false, OleDbType.Empty, NativeDBType.HCHAPTER, S_UDT, typeof(IDataReader), NativeDBType.HCHAPTER, DbType.Object ); // 36 - (hierarchical chaper)
298case TypeCode.DBNull: throw ADP.InvalidDataType(TypeCode.DBNull);
314default: throw ADP.UnknownDataTypeCode(value.GetType(), ic.GetTypeCode());
360throw ADP.DbTypeNotSupported(dbType, typeof(OleDbType)); // MDAC 66009
fx\src\data\System\Data\OleDb\OLEDB_Util.cs (49)
88if (ADP.IsEmpty(value)) { return inner; }
89return ADP.InvalidOperation(value, inner);
92return ADP.InvalidOperation(Res.GetString(Res.OleDb_UninitializedParameters, index.ToString(CultureInfo.InvariantCulture), dbtype.ToString()));
95return ADP.DataAdapter(Res.GetString(Res.OleDb_BadStatus_ParamAcc, index.ToString(CultureInfo.InvariantCulture), status.ToString()));
98return ADP.DataAdapter(Res.GetString(Res.OleDb_NoProviderSupportForParameters, provider), inner);
101return ADP.DataAdapter(Res.GetString(Res.OleDb_NoProviderSupportForSProcResetParameters, provider));
153if (ADP.IsEmpty(value)) { return inner; }
154return ADP.InvalidOperation(value, inner);
159return ADP.Argument(Res.GetString(Res.OleDb_SchemaRowsetsNotSupported, "IDBSchemaRowset", provider));
163if (!ADP.IsEmpty(provider)) {
169ADP.TraceExceptionAsReturnValue(e);
173return ADP.DataAdapter(Res.GetString(Res.OleDb_MDACNotAvailable), inner);
176return ADP.Argument(Res.GetString(Res.OleDb_MSDASQLNotSupported)); // MDAC 69975
179return ADP.DataAdapter(Res.GetString(Res.OleDb_CommandTextNotSupported, provider), inner); // 72632
182return ADP.DataAdapter(Res.GetString(Res.OleDb_PossiblePromptNotUserInteractive));
186return ADP.DataAdapter(Res.GetString(Res.OleDb_ProviderUnavailable, provider), inner);
189return ADP.DataAdapter(Res.GetString(Res.OleDb_TransactionsNotSupported, provider), inner); // 72632
192return ADP.Argument(Res.GetString(Res.OleDb_AsynchronousNotSupported));
195return ADP.Argument(Res.GetString(Res.OleDb_NoProviderSpecified));
198return ADP.Argument(Res.GetString(Res.OleDb_InvalidProviderSpecified));
201return ADP.Argument(Res.GetString(Res.OleDb_InvalidRestrictionsDbInfoKeywords), parameter);
204return ADP.Argument(Res.GetString(Res.OleDb_InvalidRestrictionsDbInfoLiteral), parameter);
207return ADP.Argument(Res.GetString(Res.OleDb_InvalidRestrictionsSchemaGuids), parameter);
210return ADP.Argument(Res.GetString(Res.OleDb_NotSupportedSchemaTable, OleDbSchemaGuid.GetTextFromValue(schema), connection.Provider));
215return ADP.InvalidEnumerationValue(typeof(OleDbType), (int)value);
220return ADP.DataAdapter(Res.GetString(Res.OleDb_BadAccessor));
223return ADP.InvalidCast();
226return ADP.InvalidCast(Res.GetString(Res.OleDb_CantConvertValue));
229return ADP.DataAdapter(Res.GetString(Res.OleDb_SignMismatch, type.Name));
232return ADP.DataAdapter(Res.GetString(Res.OleDb_DataOverflow, type.Name));
235return ADP.DataAdapter(Res.GetString(Res.OleDb_CantCreate, type.Name));
238return ADP.DataAdapter(Res.GetString(Res.OleDb_Unavailable, type.Name));
241return ADP.DataAdapter(Res.GetString(Res.OleDb_UnexpectedStatusValue, status.ToString()));
244return ADP.DataAdapter(Res.GetString(Res.OleDb_GVtUnknown, wType.ToString("X4", CultureInfo.InvariantCulture), wType.ToString(CultureInfo.InvariantCulture)));
247return ADP.DataAdapter(Res.GetString(Res.OleDb_SVtUnknown, wType.ToString("X4", CultureInfo.InvariantCulture), wType.ToString(CultureInfo.InvariantCulture)));
252return ADP.DataAdapter(Res.GetString(Res.OleDb_BadStatusRowAccessor, i.ToString(CultureInfo.InvariantCulture), rowStatus.ToString()));
255return ADP.InvalidOperation(Res.GetString(Res.OleDb_ThreadApartmentState), innerException);
260return ADP.Argument(Res.GetString(Res.OleDb_Fill_NotADODB), parameter);
263return ADP.Argument(Res.GetString(Res.OleDb_Fill_EmptyRecordSet, "IRowset"), parameter, innerException);
266return ADP.Argument(Res.GetString(Res.OleDb_Fill_EmptyRecord), parameter, innerException);
280return ADP.InvalidOperation(Res.GetString(Res.OleDb_DBBindingGetVector));
287if (((int)hr < 0) && ADP.IsEmpty(message)) {
290if (ADP.IsEmpty(message)) {
298throw ADP.Argument(Res.OleDb_ISourcesRowsetNotSupported);
303return ADP.InvalidOperation(Res.GetString(Res.OleDb_IDBInfoNotSupported));
501static internal readonly IntPtr DB_INVALID_HACCESSOR = ADP.PtrZero;
502static internal readonly IntPtr DB_NULL_HCHAPTER = ADP.PtrZero;
503static internal readonly IntPtr DB_NULL_HROW = ADP.PtrZero;
515static internal readonly int SizeOf_Variant = 8 + (2 * ADP.PtrSize); // 16 on 32bit, 24 on 64bit
fx\src\data\System\Data\OleDb\OleDbCommand.cs (33)
35private int _commandTimeout = ADP.DefaultCommandTimeout;
122return ((null != value) ? value : ADP.StrEmpty);
130if (0 != ADP.SrcCompare(_commandText, value)) {
148throw ADP.InvalidCommandTimeout(value);
158if (ADP.DefaultCommandTimeout != _commandTimeout) {
160_commandTimeout = ADP.DefaultCommandTimeout;
165return (ADP.DefaultCommandTimeout != _commandTimeout);
188throw ADP.InvalidCommandType(value);
339throw ADP.InvalidUpdateRowSource(value);
568return ExecuteReaderInternal(behavior, ADP.ExecuteReader);
610throw ADP.InvalidCommandType(CommandType);
679if (!ADP.IsCatchableExceptionType(e)) {
700if (!ADP.IsCatchableExceptionType(e)) {
778hr = _icommandText.Execute(ADP.PtrZero, ref ODB.IID_IMultipleResults, dbParams, out _recordsAffected, out executeResult);
795hr = _icommandText.Execute(ADP.PtrZero, ref ODB.IID_IRowset, dbParams, out _recordsAffected, out executeResult);
800hr = _icommandText.Execute(ADP.PtrZero, ref ODB.IID_NULL, dbParams, out _recordsAffected, out executeResult);
814hr = _icommandText.Execute(ADP.PtrZero, ref ODB.IID_IRow, dbParams, out _recordsAffected, out executeResult);
861ExecuteReaderInternal(CommandBehavior.Default, ADP.ExecuteNonQuery);
862return ADP.IntPtrToInt32(_recordsAffected);
877using(OleDbDataReader reader = ExecuteReaderInternal(CommandBehavior.Default, ADP.ExecuteScalar)) {
920hr = iopenRowset.Value.OpenRowset(ADP.PtrZero, tableID, ADP.PtrZero, ref ODB.IID_IRowset, propSet.PropertySetCount, propSet.DangerousGetHandle(), out executeResult);
932hr = iopenRowset.Value.OpenRowset(ADP.PtrZero, tableID, ADP.PtrZero, ref ODB.IID_IRowset, 0, IntPtr.Zero, out executeResult);
938hr = iopenRowset.Value.OpenRowset(ADP.PtrZero, tableID, ADP.PtrZero, ref ODB.IID_IRowset, 0, IntPtr.Zero, out executeResult);
951_recordsAffected = ADP.RecordsUnaffected;
957if (ADP.IsEmpty(cmdtxt)) {
958return ADP.StrEmpty;
979throw ADP.InvalidCommandType(cmdtype);
1106ValidateConnectionAndTransaction(ADP.Prepare);
1261throw ADP.ConnectionRequired(method);
1270throw ADP.OpenReaderExists();
fx\src\data\System\Data\OleDb\OleDbCommandBuilder.cs (27)
102throw ADP.ArgumentNull("command");
106throw ADP.DeriveParametersNotSupported(command);
111throw ADP.DeriveParametersNotSupported(command);
113throw ADP.InvalidCommandType(command.CommandType);
115if (ADP.IsEmpty(command.CommandText)) {
116throw ADP.CommandTextRequired(ADP.DeriveParameters);
120throw ADP.ConnectionRequired(ADP.DeriveParameters);
124throw ADP.OpenConnectionRequired(ADP.DeriveParameters, state);
144connection.GetLiteralQuotes(ADP.DeriveParameters, out quotePrefix, out quoteSuffix);
148throw ADP.NoStoredProcedureExists(command.CommandText);
290throw ADP.NoStoredProcedureExists(command.CommandText);
298throw ADP.NoStoredProcedureExists(command.CommandText);
328ADP.CheckArgumentNull(unquotedIdentifier, "unquotedIdentifier");
334if (ADP.IsEmpty(quotePrefix) == true) {
340throw ADP.QuotePrefixNotSet(ADP.QuoteIdentifier);
343connection.GetLiteralQuotes(ADP.QuoteIdentifier, out quotePrefix, out quoteSuffix);
351return ADP.BuildQuotedString(quotePrefix,quoteSuffix,unquotedIdentifier);
370ADP.CheckArgumentNull(quotedIdentifier, "quotedIdentifier");
377if (ADP.IsEmpty(quotePrefix) == true) {
383throw ADP.QuotePrefixNotSet(ADP.UnquoteIdentifier);
386connection.GetLiteralQuotes(ADP.UnquoteIdentifier, out quotePrefix, out quoteSuffix);
397ADP.RemoveStringQuotes(quotePrefix, quoteSuffix, quotedIdentifier, out unquotedIdentifier);
fx\src\data\System\Data\OleDb\oledbconnectionstring.cs (27)
101PossiblePrompt = ((!ADP.IsEmpty(prompt) && (0 != String.Compare(prompt, VALUES.NoPrompt, StringComparison.OrdinalIgnoreCase)))
102|| !ADP.IsEmpty(this[KEY.WindowHandle]));
111if (!ADP.IsEmpty(udlFileName)) { // fail via new FileStream vs. GetFullPath
112udlFileName = ADP.GetFullPath(udlFileName); // MDAC 82833
117if (!ADP.IsEmpty(udlConnectionString)) {
122if (validate || ADP.IsEmpty(udlConnectionString)) {
129get { return base.ConvertValueToInt32(KEY.Connect_Timeout, ADP.DefaultConnectionTimeout); }
133get { return base.ConvertValueToString(KEY.Data_Source, ADP.StrEmpty); }
137get { return base.ConvertValueToString(KEY.Initial_Catalog, ADP.StrEmpty); }
142Debug.Assert(!ADP.IsEmpty(this[KEY.Provider]), "no Provider");
225object value = ADP.LocalMachineRegistryValue(UDL.Location, UDL.Pooling);
246Debug.Assert(!ADP.IsEmpty(udlfilename), "empty filename didn't fail");
249Debug.Assert(udlfilename == ADP.GetFullPath(udlfilename), "only cache full path filenames"); // MDAC 82833
287int hdrlength = ADP.CharSize*UDL.Header.Length;
290if (length < hdrlength || (0 != length%ADP.CharSize)) {
291failure = ADP.InvalidUDL();
297failure = ADP.InvalidUDL();
300failure = ADP.InvalidUDL();
312if (!ADP.IsCatchableExceptionType(e)) {
316throw ADP.UdlFileError(e);
333throw ADP.InvalidConnectTimeoutValue();
350progid = ConvertValueToString(KEY.Provider, ADP.StrEmpty).Trim();
359bool hasOleDBServices = (base.ContainsKey(KEY.Ole_DB_Services) && !ADP.IsEmpty((string)base[KEY.Ole_DB_Services]));
361string classid = (string) ADP.ClassesRootRegistryValue(progid + "\\CLSID", String.Empty);
368object tmp = ADP.ClassesRootRegistryValue("CLSID\\{" + classidProvider.ToString("D", CultureInfo.InvariantCulture) + "}", ODB.OLEDB_SERVICES);
378ADP.TraceExceptionWithoutRethrow(e);
405if (ADP.IsEmpty(progid)) {
fx\src\data\System\Data\OleDb\OleDbDataReader.cs (62)
63private IntPtr _recordsAffected = ADP.RecordsUnaffected;
140throw ADP.DataReaderClosed("Depth");
150throw ADP.DataReaderClosed("FieldCount");
161throw ADP.DataReaderClosed("HasRows");
185return ADP.IntPtrToInt32(_recordsAffected);
256throw ADP.DataReaderClosed("GetSchemaTable");
441IntPtr columnCount = ADP.PtrZero; // column count
442IntPtr columnInfos = ADP.PtrZero; // ptr to byvalue tagDBCOLUMNINFO[]
467Marshal.PtrToStructure(ADP.IntPtrOffset(columnInfos, offset), dbColumnInfo);
527if (ADP.PtrZero != dbColumnInfo.columnid.ulPropid) {
535info.propid = ADP.PtrZero;
574hr = icolumnsRowset.GetColumnsRowset(ADP.PtrZero, cOptColumns, prgOptColumns, ref ODB.IID_IRowset, 0, ADP.PtrZero, out rowset);
775throw ADP.InvalidSourceBufferIndex(0, dataIndex, "dataIndex");
782throw ADP.NonSeqByteAccess(dataIndex, _sequentialBytesRead, method);
790ColumnBinding binding = DoSequentialCheck(ordinal, dataIndex, ADP.GetBytes);
799throw ADP.InvalidSourceBufferIndex(value.Length, srcIndex, "dataIndex");
802throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex");
810throw ADP.InvalidDataLength(length);
819ColumnBinding binding = DoSequentialCheck(ordinal, dataIndex, ADP.GetChars);
829throw ADP.InvalidSourceBufferIndex(value.Length, srcIndex, "dataIndex");
832throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex");
840throw ADP.InvalidDataLength(length);
850throw ADP.NotSupported();
883reader.InitializeIRowset(result, chapterHandle, ADP.RecordsUnaffected);
900throw ADP.DataReaderNoData();
926throw ADP.DataReaderNoData();
959throw ADP.DataReaderNoData();
965throw ADP.DataReaderNoData();
984throw ADP.DataReaderNoData();
987throw ADP.NonSequentialColumnAccess(ordinal, _nextValueForRetrieval);
1022throw ADP.DataReaderNoData();
1039throw ADP.ArgumentNull("values");
1091throw ADP.DataReaderClosed("VisibleFieldCount");
1106recordsAffected = ADP.RecordsUnaffected;
1122hr = imultipleResults.GetResult(ADP.PtrZero, ODB.DBRESULTFLAG_DEFAULT, ref ODB.IID_NULL, out affected, out result);
1181throw ADP.DataReaderClosed("NextResult");
1205hr = imultipleResults.GetResult(ADP.PtrZero, ODB.DBRESULTFLAG_DEFAULT, ref ODB.IID_IRowset, out affected, out result);
1265throw ADP.DataReaderClosed("Read");
1355if ((ADP.PtrZero == _rowHandleFetchCount) || (20 <= (int)_rowHandleFetchCount)) {
1361if ((ADP.PtrZero == _rowHandleFetchCount) || (20 <= (long)_rowHandleFetchCount)) {
1453maxLen = ADP.PtrSize;
1468maxLen = ADP.PtrSize;
1485maxLen = ADP.PtrSize;
1628hr = irowset.ReleaseRows(_rowFetchedCount, _rowHandleNativeBuffer, ADP.PtrZero, ADP.PtrZero, ADP.PtrZero);
1772else if ((0 != ADP.SrcCompare(baseTableName, info.baseTableName))
1773|| (0 != ADP.SrcCompare(baseCatalogName, catalogName))
1774|| (0 != ADP.SrcCompare(baseSchemaName, schemaName))) { // MDAC 71808
1790baseCatalogName = ADP.IsEmpty(baseCatalogName) ? null : baseCatalogName;
1791baseSchemaName = ADP.IsEmpty(baseSchemaName) ? null : baseSchemaName;
1796_connection.GetLiteralQuotes(ADP.GetSchemaTable, out s, out p);
1811if (!ADP.IsEmpty(basecolumname)) {
1817if (!ADP.IsEmpty(basecolumname)) {
1850if (!ADP.IsCatchableExceptionType(e)) {
1854ADP.TraceExceptionWithoutRethrow(e);
1901if (!ADP.IsCatchableExceptionType(e)) {
1905ADP.TraceExceptionWithoutRethrow(e);
2084if (4 == ADP.PtrSize) {
2092if (4 == ADP.PtrSize) {
2096info.size = ADP.IntPtrToInt32((IntPtr)unchecked((long)columnsize.columnBinding.Value_UI8()));
fx\src\data\System\Data\OleDb\OleDbMetaDataFactory.cs (33)
67throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.MetaDataCollections);
89throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.MetaDataCollections,_populationMechanism);
93throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.MetaDataCollections,_collectionName);
99throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.Restrictions,_collectionName);
106if (ADP.IsEmpty(populationMechanismValue )) {
107throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.MetaDataCollections,_populationMechanism);
110if (ADP.IsEmpty(collectionNameValue)) {
111throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.MetaDataCollections,_collectionName);
144if (ADP.IsEmpty(restrictionCollectionNameValue)) {
145throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.Restrictions,_collectionName);
174ADP.EscapeSpecialCharacters(invalidStartingChars,regularExpression);
176ADP.EscapeSpecialCharacters(invalidChars,regularExpression);
189throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.DataSourceInformation);
197throw ADP.IncorrectNumberOfDataSourceInformationRows();
208ADP.EscapeSpecialCharacters(catalogSeparatorPattern,patternEscaped);
213ADP.EscapeSpecialCharacters(schemaSeparatorPattern,patternEscaped);
220ADP.EscapeSpecialCharacters(schemaSeparatorPattern, patternEscaped);
299connection.GetLiteralQuotes(ADP.GetSchema, out quotePrefix, out quoteSuffix);
313ADP.EscapeSpecialCharacters(quoteSuffix,scratchStringBuilder );
317ADP.EscapeSpecialCharacters(quotePrefix, scratchStringBuilder);
339throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.DataTypes);
459throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.ReservedWords);
467throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.ReservedWords);
485if (ADP.IsEmptyArray(restrictions) == false){
486throw ADP.TooManyRestrictions(DbMetaDataCollectionNames.DataSourceInformation);
491if (ADP.IsEmptyArray(restrictions) == false){
492throw ADP.TooManyRestrictions(DbMetaDataCollectionNames.DataTypes);
497if (ADP.IsEmptyArray(restrictions) == false){
498throw ADP.TooManyRestrictions(DbMetaDataCollectionNames.ReservedWords);
521throw ADP.TooManyRestrictions(collectionName);
560throw ADP.InvalidRestrictionValue(collectionName,"TYPE",restrictions[indexRestrictionTypeSlot]);
594throw ADP.InvalidRestrictionValue(collectionName,"PROCEDURE_TYPE",restrictions[procedureRestrictionTypeSlot]);
609throw ADP.UnableToBuildCollection(collectionName);
fx\src\data\System\Data\OleDb\RowBinding.cs (34)
86return ADP.IntPtrOffset(DangerousGetHandle(), _headerLength);
95return ADP.IntPtrOffset(DangerousGetHandle(), valueOffset);
136IntPtr ptr = ADP.IntPtrOffset(buffer, (i * ODB.SizeOf_tagDBBINDING));
175IntPtr buffer = ADP.IntPtrOffset(DangerousGetHandle(), offset);
195IntPtr buffer = ADP.PtrZero;
201buffer = ADP.IntPtrOffset(DangerousGetHandle(), offset);
210NativeOledbWrapper.MemoryCopy(ADP.IntPtrOffset(buffer,ODB.SizeOf_Variant), buffer, ODB.SizeOf_Variant);
227Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
242Marshal.WriteIntPtr(base.handle, offset + ADP.PtrSize, ptr);
258Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
261if (ADP.PtrZero == pinnedValue) { // empty array scenario
262pinnedValue = ADP.IntPtrOffset(base.handle, _emptyStringOffset);
272Marshal.WriteIntPtr(base.handle, offset + ADP.PtrSize, pinnedValue); // original parameter value
354Debug.Assert(ADP.PtrZero != buffer && _needToReset && _haveData, "shouldn't be calling ResetValues");
356IntPtr ptr = ADP.IntPtrOffset(buffer, (i * ODB.SizeOf_tagDBBINDING));
430IntPtr chapter = SafeNativeMethods.InterlockedExchangePointer(ADP.IntPtrOffset(buffer, valueOffset), ADP.PtrZero);
448IntPtr originalValue = Marshal.ReadIntPtr(buffer, valueOffset + ADP.PtrSize);
450if ((ADP.PtrZero != currentValue) && (currentValue != originalValue)) {
453if (ADP.PtrZero != originalValue) {
458Marshal.WriteIntPtr(buffer, valueOffset, ADP.PtrZero);
459Marshal.WriteIntPtr(buffer, valueOffset + ADP.PtrSize, ADP.PtrZero);
472IntPtr originalValue = Marshal.ReadIntPtr(buffer, valueOffset + ADP.PtrSize);
475if ((ADP.PtrZero != currentValue) && (currentValue != originalValue)) {
480Marshal.WriteIntPtr(buffer, valueOffset, ADP.PtrZero);
481Marshal.WriteIntPtr(buffer, valueOffset + ADP.PtrSize, ADP.PtrZero);
493IntPtr currentHandle = ADP.IntPtrOffset(buffer, valueOffset);
494IntPtr originalHandle = ADP.IntPtrOffset(buffer, valueOffset+ODB.SizeOf_Variant);
519IntPtr currentHandle = ADP.IntPtrOffset(buffer, valueOffset);
520IntPtr originalHandle = ADP.IntPtrOffset(buffer, valueOffset+NativeOledbWrapper.SizeOfPROPVARIANT);
541Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
549IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
fx\src\data\System\Data\ProviderBase\DbBuffer.cs (26)
68Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
76IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
93Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
101IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
142Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
151IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
170Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
179IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
220Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
229IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
264Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
273IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
308Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
346Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
353IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
386Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
395IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
408Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
417IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
454Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
463IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
496Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
505IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
660throw ADP.NumericToDecimalOverflow();
687throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer);
fx\src\Data\System\Data\ProviderBase\DbParameterCollectionHelper.cs (14)
80throw ADP.ArgumentNull("values");
94throw ADP.ParametersSourceIndex(parameterName, this, ItemType);
131throw ADP.ParametersSourceIndex(parameterName, this, ItemType);
141if (0 == ADP.SrcCompare(parameterName, parameter.ParameterName)) {
149if (0 == ADP.DstCompare(parameterName, parameter.ParameterName)) {
190throw ADP.ParametersMappingIndex(index, this);
202throw ADP.CollectionRemoveInvalidObject(ItemType, this);
246throw ADP.ParametersSourceIndex(parameterName, this, ItemType);
253throw ADP.ParameterNull("value", this, ItemType);
259throw ADP.ParametersIsNotParent(ItemType, this);
262throw ADP.ParametersIsParent(ItemType, this);
270name = ADP.Parameter + index.ToString(CultureInfo.CurrentCulture);
279throw ADP.ParameterNull("value", this, ItemType);
282throw ADP.InvalidParameterType(this, ItemType, value);
fx\src\data\System\Data\Sql\SqlMetaData.cs (35)
467throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
472throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
477throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
482throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
488throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
493throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
497throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
502throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
536throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
541throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
546throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
551throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
557throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
571throw ADP.InvalidEnumerationValue(typeof(SqlCompareOptions), (int)compareOptions);
640throw ADP.ArgumentNull("userDefinedType");
667throw ADP.ArgumentNull("objectName");
685throw ADP.ArgumentNull("name");
1055case TypeCode.Empty: throw ADP.InvalidDataType(TypeCode.Empty);
1059case TypeCode.SByte: throw ADP.InvalidDataType(TypeCode.SByte);
1062case TypeCode.UInt16: throw ADP.InvalidDataType(TypeCode.UInt16);
1063case TypeCode.UInt32: throw ADP.InvalidDataType(TypeCode.UInt32);
1064case TypeCode.UInt64: throw ADP.InvalidDataType(TypeCode.UInt64);
1074throw ADP.InvalidDataType(TypeCode.UInt64);
1114throw ADP.UnknownDataType(dataType);
1119default: throw ADP.UnknownDataTypeCode(dataType, Type.GetTypeCode(dataType));
1127throw ADP.ArgumentNull("value");
1136case TypeCode.DBNull: throw ADP.InvalidDataType(TypeCode.DBNull);
1145case TypeCode.Empty: throw ADP.InvalidDataType(TypeCode.Empty);
1149case TypeCode.SByte: throw ADP.InvalidDataType(TypeCode.SByte);
1162case TypeCode.UInt16: throw ADP.InvalidDataType(TypeCode.UInt16);
1163case TypeCode.UInt32: throw ADP.InvalidDataType(TypeCode.UInt32);
1164case TypeCode.UInt64: throw ADP.InvalidDataType(TypeCode.UInt64);
1301throw ADP.UnknownDataType(dataType);
1305default: throw ADP.UnknownDataTypeCode(dataType, Type.GetTypeCode(dataType));
1442throw ADP.InvalidMetaDataValue();
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (27)
283throw ADP.ArgumentNull("connection");
304throw ADP.ArgumentNull("connectionString");
325throw ADP.ArgumentOutOfRange("BatchSize");
363throw ADP.ArgumentNull("DestinationTableName");
366throw ADP.ArgumentOutOfRange("DestinationTableName");
381throw ADP.ArgumentOutOfRange("NotifyAfter");
436if (ADP.IsEmpty(parts[MultipartIdentifier.TableIndex])) {
459if (!ADP.IsEmpty(TableName)) {
467if (!ADP.IsEmpty(SchemaName)) {
475if (isTempTable && ADP.IsEmpty(CatalogName)) {
484if (!ADP.IsEmpty(CatalogName)) {
814if(!ADP.IsCatchableExceptionType(e)) {
817ADP.TraceExceptionWithoutRethrow(e);
867ADP.IsNullOrSqlType(columnValue, out isNull, out isSqlType);
928ADP.IsNullOrSqlType(columnValue, out isNull, out isSqlType);
940ADP.IsNullOrSqlType(currentRowValue, out isNull, out isSqlType);
992throw ADP.NotSupported();
1057throw ADP.NotSupported();
1164throw ADP.ConnectionRequired(method);
1181throw ADP.TransactionConnectionMismatch();
1258if(ADP.IsEmpty(name)) return null;
1367throw SQL.BulkLoadCannotConvertValue(value.GetType(), mt, ADP.ParameterValueOutOfRange(sqlValue));
1455if(!ADP.IsCatchableExceptionType(e)) {
2008throw ADP.ClosedConnectionError();
2085exception = ADP.OpenConnectionRequired("CheckAndRaiseNotification", _connection.State);
2090if (!ADP.IsCatchableExceptionType(e)) {
2113throw ADP.OpenConnectionRequired(SQL.WriteToServer, _connection.State);
fx\src\data\System\Data\SqlClient\SqlCommand.cs (97)
51private int _commandTimeout = ADP.DefaultCommandTimeout;
217throw ADP.ClosedConnectionError();
637return ((null != value) ? value : ADP.StrEmpty);
645if (0 != ADP.SrcCompare(_commandText, value)) {
675throw ADP.InvalidCommandTimeout(value);
685if (ADP.DefaultCommandTimeout != _commandTimeout) {
687_commandTimeout = ADP.DefaultCommandTimeout;
692return (ADP.DefaultCommandTimeout != _commandTimeout);
718throw ADP.InvalidCommandType(value);
784throw ADP.InvalidUpdateRowSource(value);
812if (!ADP.IsCatchableOrSecurityExceptionType(e)) {
816ADP.TraceExceptionWithoutRethrow(e);
862ValidateCommand(ADP.Prepare, false /*not async*/);
915processFinallyBlock = ADP.IsCatchableExceptionType(e);
1142ds = RunExecuteReader(0, RunBehavior.ReturnImmediately, true, ADP.ExecuteScalar);
1198InternalExecuteNonQuery(null, ADP.ExecuteNonQuery, false, CommandTimeout, out usedCache);
1228InternalExecuteNonQuery(null, ADP.ExecuteNonQuery, true, CommandTimeout, out usedCache);
1275Task execNQ = InternalExecuteNonQuery(localCompletion, ADP.BeginExecuteNonQuery, false, timeout, out usedCache, asyncWrite, inRetry: inRetry);
1284if (!ADP.IsCatchableOrSecurityExceptionType(e)) {
1296if (!TriggerInternalEndAndRetryIfNecessary(behavior, stateObject, timeout, ADP.EndExecuteNonQuery, usedCache, inRetry, asyncWrite, globalCompletion, localCompletion, InternalEndExecuteNonQuery, BeginExecuteNonQueryInternal)) {
1328cachedAsyncState.SetActiveConnectionAndResult(completion, ADP.EndExecuteNonQuery, _activeConnection);
1363throw ADP.ArgumentNull("asyncResult");
1385throw ADP.ClosedConnectionError();
1392throw ADP.MethodCalledTwice(endMethod);
1395throw ADP.MismatchedAsyncResult(cachedAsyncState.EndMethodName, endMethod);
1399throw ADP.ClosedConnectionError();
1472int result = (int)InternalEndExecuteNonQuery(asyncResult, ADP.EndExecuteNonQuery, isInternal: false);
1490if (ADP.IsCatchableExceptionType(e)) {
1567processFinallyBlock = ADP.IsCatchableExceptionType(e);
1711ds = RunExecuteReader(CommandBehavior.SequentialAccess, RunBehavior.ReturnImmediately, true, ADP.ExecuteXmlReader);
1767RunExecuteReader(behavior, RunBehavior.ReturnImmediately, true, ADP.BeginExecuteXmlReader, localCompletion, timeout, out writeTask, out usedCache, asyncWrite, inRetry);
1770if (!ADP.IsCatchableOrSecurityExceptionType(e)) {
1789if (!TriggerInternalEndAndRetryIfNecessary(behavior, stateObject, timeout, ADP.EndExecuteXmlReader, usedCache, inRetry, asyncWrite, globalCompletion, localCompletion, InternalEndExecuteReader, BeginExecuteXmlReaderInternal)) {
1821cachedAsyncState.SetActiveConnectionAndResult(completion, ADP.EndExecuteXmlReader, _activeConnection);
1895XmlReader result = CompleteXmlReader(InternalEndExecuteReader(asyncResult, ADP.EndExecuteXmlReader, isInternal: false));
1913if (ADP.IsCatchableExceptionType(e)) {
1937if (ADP.IsCatchableExceptionType(e)) {
1962return ExecuteReader(behavior, ADP.ExecuteReader);
1972return ExecuteReader(CommandBehavior.Default, ADP.ExecuteReader);
1985return ExecuteReader(behavior, ADP.ExecuteReader);
2103SqlDataReader result = InternalEndExecuteReader(asyncResult, ADP.EndExecuteReader, isInternal: false);
2122if (ADP.IsCatchableExceptionType(e)) {
2160RunExecuteReader(behavior, RunBehavior.ReturnImmediately, true, ADP.BeginExecuteReader, localCompletion, timeout, out writeTask, out usedCache, asyncWrite, inRetry);
2163if (!ADP.IsCatchableOrSecurityExceptionType(e)) {
2182if (!TriggerInternalEndAndRetryIfNecessary(behavior, stateObject, timeout, ADP.EndExecuteReader, usedCache, inRetry, asyncWrite, globalCompletion, localCompletion, InternalEndExecuteReader, BeginExecuteReaderInternal)) {
2209long firstAttemptStart = ADP.TimerCurrent();
2233if (ADP.IsCatchableExceptionType(e)) {
2318cachedAsyncState.SetActiveConnectionAndResult(completion, ADP.EndExecuteReader, _activeConnection);
2715throw ADP.DeriveParametersNotSupported(this);
2720throw ADP.DeriveParametersNotSupported(this);
2722throw ADP.InvalidCommandType(this.CommandType);
2726ValidateCommand(ADP.DeriveParameters, false /*not async*/);
2730if (null == parsedSProc[3] || ADP.IsEmpty(parsedSProc[3]))
2732throw ADP.NoStoredProcedureExists(this.CommandText);
2744if (!ADP.IsEmpty(parsedSProc[0])) {
2750if (ADP.IsEmpty(parsedSProc[1])) {
2804if (!ADP.IsEmpty(parsedSProc[2])) { // SchemaName is 3rd element in parsed array
2853ADP.IsNull(r[colNames[(int)ProcParamsColIndex.TypeName]]) ?
2854ADP.StrEmpty :
2918p.XmlSchemaCollectionDatabase = ADP.IsNull(value) ? String.Empty : (string) value;
2921p.XmlSchemaCollectionOwningSchema = ADP.IsNull(value) ? String.Empty : (string) value;
2924p.XmlSchemaCollectionName = ADP.IsNull(value) ? String.Empty : (string) value;
2938processFinallyBlock = ADP.IsCatchableExceptionType(e);
2953throw ADP.NoStoredProcedureExists(this.CommandText);
2993if (!ADP.IsEmpty(notifyContext)) {
3066long reconnectionStart = ADP.TimerCurrent();
3125processFinallyBlock = ADP.IsCatchableExceptionType(e);
3187processFinallyBlock = ADP.IsCatchableExceptionType(e);
3412processFinallyBlockAsync = ADP.IsCatchableExceptionType(e);
3484processFinallyBlockAsync = ADP.IsCatchableExceptionType(e);
3513processFinallyBlock = ADP.IsCatchableExceptionType(e);
3551if (ADP.IsCatchableExceptionType(e)) {
3783throw ADP.ClosedConnectionError();
4164long firstAttemptStart = ADP.TimerCurrent();
4281long parameterEncryptionStart = ADP.TimerCurrent();
4352long reconnectionStart = ADP.TimerCurrent();
4561processFinallyBlock = ADP.IsCatchableExceptionType (e);
4638if (!ADP.IsCatchableOrSecurityExceptionType(e)) {
4664processFinallyBlock = ADP.IsCatchableExceptionType(e);
4704if (ADP.IsCatchableExceptionType(e)) {
4756if (ADP.IsCatchableExceptionType(e)) {
4794throw ADP.ClosedConnectionError();
4804throw ADP.ConnectionRequired(method);
4822throw ADP.OpenConnectionRequired(method, ConnectionState.Closed);
4825throw ADP.OpenConnectionRequired(method, ConnectionState.Broken);
4829throw ADP.OpenConnectionRequired(method, ConnectionState.Closed);
4832throw ADP.OpenConnectionRequired(method, ConnectionState.Broken);
4885throw ADP.TransactionRequired(method);
4891throw ADP.TransactionConnectionMismatch();
4893if (ADP.IsEmpty(this.CommandText))
4894throw ADP.CommandTextRequired(method);
4938throw ADP.ClosedConnectionError();
5174throw ADP.ClosedConnectionError();
5771if(ADP.IsEmpty(fullTypeName))
5778if (ADP.IsEmpty(typeName)) {
5888bld.Append(ADP.BuildQuotedString("[", "]", strings[i]));
6226throw ADP.VersionDoesNotSupportDataType(mt.TypeName);
fx\src\data\System\Data\SqlClient\SqlCommandBuilder.cs (11)
48throw ADP.SingleValuedProperty("CatalogLocation", "Start");
65throw ADP.SingleValuedProperty("CatalogSeparator", ".");
96throw ADP.DoubleValuedProperty("QuotePrefix", "[", "\"");
113throw ADP.DoubleValuedProperty("QuoteSuffix", "]", "\"");
130throw ADP.SingleValuedProperty("SchemaSeparator",".");
202throw ADP.InvalidPrefixSuffix();
210throw ADP.ArgumentNull("command");
301ADP.CheckArgumentNull(unquotedIdentifier, "unquotedIdentifier");
305return ADP.BuildQuotedString(quotePrefixLocal,quoteSuffixLocal,unquotedIdentifier);;
320ADP.CheckArgumentNull(quotedIdentifier, "quotedIdentifier");
326ADP.RemoveStringQuotes(quotePrefixLocal, quoteSuffixLocal, quotedIdentifier, out unquotedIdentifier);
fx\src\data\System\Data\SqlClient\SqlConnection.cs (72)
182if (key.StartsWith(ADP.ColumnEncryptionSystemProviderNamePrefix, StringComparison.InvariantCultureIgnoreCase))
184throw SQL.InvalidCustomKeyStoreProviderName(key, ADP.ColumnEncryptionSystemProviderNamePrefix);
315throw ADP.InvalidMixedArgumentOfSecureAndClearCredential();
320throw ADP.InvalidMixedArgumentOfSecureCredentialAndIntegratedSecurity();
325throw ADP.InvalidMixedArgumentOfSecureCredentialAndContextConnection();
362if (_connectRetryCount == 1 && ADP.IsAzureSqlServerEndpoint(connString.DataSource))
405ADP.TimerCurrent(out _statistics._openTimestamp);
422ADP.TimerCurrent(out _statistics._closeTimestamp);
492result = (!ADP.IsEmpty(opt.UserID) || !ADP.IsEmpty(opt.Password));
556throw ADP.OpenConnectionPropertySet("AccessToken", InnerConnection.State);
800throw ADP.OpenConnectionPropertySet("Credential", InnerConnection.State);
815throw ADP.InvalidMixedUsageOfCredentialAndAccessToken();
835throw ADP.InvalidMixedUsageOfSecureAndClearCredential();
840throw ADP.InvalidMixedUsageOfSecureCredentialAndIntegratedSecurity();
845throw ADP.InvalidMixedArgumentOfSecureCredentialAndContextConnection();
855throw ADP.InvalidMixedUsageOfAccessTokenAndUserIDPassword();
859throw ADP.InvalidMixedUsageOfAccessTokenAndIntegratedSecurity();
863throw ADP.InvalidMixedUsageOfAccessTokenAndContextConnection();
867throw ADP.InvalidMixedUsageOfAccessTokenAndAuthentication();
872throw ADP.InvalidMixedUsageOfAccessTokenAndCredential();
958string xactName = ADP.IsEmpty(transactionName)? "None" : transactionName;
1040ADP.CheckArgumentNull(connection, "connection");
1105ADP.TimerCurrent(out _statistics._closeTimestamp);
1199throw ADP.InternalError(ADP.InternalErrorCode.SynchronousConnectReturnedPending);
1225commandTimeoutExpiration = ADP.TimerCurrent() + ADP.TimerFromSeconds(timeout);
1260if (timeout > 0 && ADP.TimerRemaining(commandTimeoutExpiration) < ADP.TimerFromSeconds(ConnectRetryInterval)) {
1403System.Transactions.Transaction transaction = ADP.GetCurrentTransaction();
1414result.SetException(ADP.ExceptionWithStackTrace(SQL.NotAvailableOnContextConnection()));
1500_result.SetException(ADP.ExceptionWithStackTrace(ADP.InternalError(ADP.InternalErrorCode.CompletedConnectReturnedPending)));
1593ADP.TimerCurrent(out _statistics._openTimestamp);
1719if (!ADP.IsEmpty(name)) {
1793ADP.TraceExceptionWithoutRethrow(e);
1807throw ADP.ClosedConnectionError();
1816throw ADP.OpenConnectionRequired(method, innerConnection.State);
1824throw ADP.ClosedConnectionError();
1832throw ADP.OpenConnectionRequired(method, InnerConnection.State);
1854if (!ADP.IsCatchableOrSecurityExceptionType(e)) {
1858ADP.TraceExceptionWithoutRethrow(e);
1881if (ADP.IsPlatformNT5) {
1892if (ADP.PtrZero != hFileMap) {
1894if (ADP.PtrZero != pMemMap) {
2034if (ADP.IsEmpty(connectionString)) {
2037if (ADP.IsEmpty(newPassword)) {
2041throw ADP.InvalidArgumentLength("newPassword", TdsEnums.MAXLEN_NEWPASSWORD);
2051if (! ADP.IsEmpty(connectionOptions.AttachDBFilename)) {
2073if (ADP.IsEmpty(connectionString)) {
2087throw ADP.MustBeReadOnly("newSecurePassword");
2091throw ADP.InvalidArgumentLength("newSecurePassword", TdsEnums.MAXLEN_NEWPASSWORD);
2099if (!ADP.IsEmpty(connectionOptions.UserID) || !ADP.IsEmpty(connectionOptions.Password)) {
2100throw ADP.InvalidMixedArgumentOfSecureAndClearCredential();
2107if (! ADP.IsEmpty(connectionOptions.AttachDBFilename)) {
2150Debug.Assert(ADP.PtrZero != sdc.pMemMap, "SQL Debug: invalid null value for pMemMap!");
2172ADP.TimerCurrent(out _statistics._openTimestamp);
2194ADP.TimerCurrent(out _statistics._closeTimestamp);
2219if (throwOnError || !ADP.IsCatchableExceptionType(e)) {
2231Debug.Assert(!ADP.IsEmpty(metaData.udtAssemblyQualifiedName), "Unexpected state on GetUDTInfo");
2244if (returnDBNull && ADP.IsNull(value)) {
2251if (ADP.IsNull(value)) {
2465if (ADP.IsPlatformNT5) {
2484ADP.InvalidPtr/*INVALID_HANDLE_VALUE*/,
2515Marshal.Copy(rgbMachineName, 0, ADP.IntPtrOffset(pMemMap, offset), rgbMachineName.Length);
2517Marshal.Copy(rgbSDIDLLName, 0, ADP.IntPtrOffset(pMemMap, offset), rgbSDIDLLName.Length);
2522Marshal.Copy(rgbData, 0, ADP.IntPtrOffset(pMemMap, offset), (int)cbData);
2569internal IntPtr pMemMap = ADP.PtrZero;
2570internal IntPtr hMemMap = ADP.PtrZero;
fx\src\data\System\Data\SqlClient\SqlConnectionString.cs (32)
34internal const int Connect_Timeout = ADP.DefaultConnectionTimeout;
260_enlist = ConvertValueToBoolean(KEY.Enlist, ADP.IsWindowsNT);
322Object obj = ADP.LocalMachineRegistryValue(folder, value);
330throw ADP.InvalidConnectionOptionValue(KEY.Load_Balance_Timeout);
334throw ADP.InvalidConnectionOptionValue(KEY.Connect_Timeout);
338throw ADP.InvalidConnectionOptionValue(KEY.Max_Pool_Size);
342throw ADP.InvalidConnectionOptionValue(KEY.Min_Pool_Size);
345throw ADP.InvalidMinMaxPoolSizeValues();
356throw ADP.InvalidConnectionOptionValue(KEY.Network_Library);
383throw ADP.MissingConnectionOptionValue(KEY.FailoverPartner, KEY.Initial_Catalog);
392throw ADP.InvalidConnectionOptionValue(KEY.AttachDBFilename);
406throw ADP.InvalidConnectionOptionValue(KEY.AttachDBFilename);
414if (true == _userInstance && !ADP.IsEmpty(_failoverPartner)) {
418if (ADP.IsEmpty(typeSystemVersionString)) {
442throw ADP.InvalidConnectionOptionValue(KEY.Type_System_Version);
445if (ADP.IsEmpty(transactionBindingString)) {
456throw ADP.InvalidConnectionOptionValue(KEY.TransactionBinding);
460throw ADP.InvalidConnectRetryCountValue();
464throw ADP.InvalidConnectRetryIntervalValue();
712result = ADP.MachineName();
757throw ADP.InvalidConnectionOptionValueLength(key, limit);
762if (ADP.IsEmpty(host)) {
770string name = ADP.GetComputerNameDnsFullyQualified(); // i.e, machine.location.corp.company.com
775throw ADP.InvalidConnectionOptionValue(KEY.AttachDBFilename);
794throw ADP.InvalidConnectionOptionValue(KEY.ApplicationIntent, e);
797throw ADP.InvalidConnectionOptionValue(KEY.ApplicationIntent, e);
816throw ADP.InvalidConnectionOptionValue(KEY.PoolBlockingPeriod, e);
820throw ADP.InvalidConnectionOptionValue(KEY.PoolBlockingPeriod, e);
836throw ADP.InvalidConnectionOptionValue(KEY.Authentication, e);
839throw ADP.InvalidConnectionOptionValue(KEY.Authentication, e);
859throw ADP.InvalidConnectionOptionValue(KEY.ColumnEncryptionSetting, e);
862throw ADP.InvalidConnectionOptionValue(KEY.ColumnEncryptionSetting, e);
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (142)
150throw ADP.DataReaderClosed("Depth");
161throw ADP.DataReaderClosed("FieldCount");
164throw ADP.AsyncOperationPending();
178throw ADP.DataReaderClosed("HasRows");
181throw ADP.AsyncOperationPending();
217throw ADP.DataReaderClosed("MetaData");
313length /= ADP.CharSize;
385throw ADP.DataReaderClosed("VisibleFieldCount");
655if (!ADP.IsEmpty(col.serverName)) {
658if (!ADP.IsEmpty(col.catalogName)) {
661if (!ADP.IsEmpty(col.schemaName)) {
664if (!ADP.IsEmpty(col.tableName)) {
667if (!ADP.IsEmpty(col.baseColumn)) {
670else if (!ADP.IsEmpty(col.column)) {
1102networkPacketTaskSource.TrySetException(ADP.ClosedConnectionError());
1531throw ADP.AsyncOperationPending();
1601throw ADP.NegativeParameter("dataIndex");
1604throw ADP.NonSeqByteAccess(dataIndex, _columnDataBytesRead, ADP.GetBytes);
1617throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex");
1621throw ADP.InvalidBufferSizeOrIndex(length, bufferIndex);
1624throw ADP.InvalidDataLength(length);
1654throw ADP.NegativeParameter("dataIndex");
1657throw ADP.InvalidSourceBufferIndex(cbytes, dataIndex, "dataIndex");
1708if (!ADP.IsCatchableExceptionType(e)) {
1714throw ADP.InvalidDataLength(length);
1718throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex");
1722throw ADP.InvalidBufferSizeOrIndex(cbytes, bufferIndex);
1761throw ADP.AsyncOperationPending();
1932throw ADP.NotSupported();
1941throw ADP.AsyncOperationPending();
1970throw ADP.InvalidDataLength(length);
1979throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex");
1984throw ADP.InvalidBufferSizeOrIndex(length, bufferIndex);
1994if (ADP.IsCatchableExceptionType(ex)) {
2014throw ADP.NonSeqByteAccess(dataIndex, _columnDataCharsRead, ADP.GetChars);
2031throw ADP.InvalidSourceBufferIndex(cchars, dataIndex, "dataIndex");
2057if (!ADP.IsCatchableExceptionType(e)) {
2063throw ADP.InvalidDataLength(length);
2067throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex");
2071throw ADP.InvalidBufferSizeOrIndex(cchars, bufferIndex);
2119throw ADP.NonSeqByteAccess(dataIndex, _columnDataCharsRead, ADP.GetChars);
2227throw ADP.NotSupported();
2416throw ADP.AsyncOperationPending();
2450throw ADP.DataReaderClosed("GetSqlValueFromSqlBufferInternal");
2475throw ADP.ArgumentNull("values");
2569throw ADP.AsyncOperationPending();
2610throw ADP.DataReaderClosed("GetValueFromSqlBufferInternal");
2622throw ADP.AsyncOperationPending();
2680throw ADP.ArgumentNull("values");
2808throw ADP.ClosedConnectionError();
2883throw ADP.ClosedConnectionError();
2979throw ADP.DataReaderClosed("NextResult");
3252throw ADP.DataReaderClosed("Read");
3307throw ADP.AsyncOperationPending();
3849throw ADP.AsyncOperationPending();
3858throw ADP.AsyncOperationPending();
3864throw ADP.IndexOutOfRange();
3870throw ADP.AsyncOperationPending();
3880throw ADP.DataReaderClosed(methodName ?? "CheckHeaderIsReady");
3883throw ADP.AsyncOperationPending();
3890throw ADP.IndexOutOfRange();
3894throw ADP.NonSequentialColumnAccess(columnIndex, Math.Max(_sharedState._nextColumnHeaderToRead - 1, _lastColumnWithDataChunkRead));
3900throw ADP.DataReaderClosed(methodName ?? "CheckDataIsReady");
3903throw ADP.AsyncOperationPending();
3910throw ADP.IndexOutOfRange();
3916throw ADP.NonSequentialColumnAccess(columnIndex, Math.Max(_sharedState._nextColumnDataToRead, _lastColumnWithDataChunkRead + 1));
3940source.SetException(ADP.ExceptionWithStackTrace(ADP.DataReaderClosed("NextResultAsync")));
3955source.SetException(ADP.ExceptionWithStackTrace(SQL.PendingBeginXXXExists()));
3979return more ? ADP.TrueTask : ADP.FalseTask;
4001source.SetException(ADP.ExceptionWithStackTrace(ADP.DataReaderClosed("GetBytesAsync")));
4007source.SetException(ADP.ExceptionWithStackTrace(ADP.AsyncOperationPending()));
4023source.SetException(ADP.ExceptionWithStackTrace(ADP.AsyncOperationPending()));
4054return ADP.CreatedTaskWithCancellation<int>();
4058return ADP.CreatedTaskWithException<int>(ADP.ExceptionWithStackTrace(ADP.IO(SQLMessage.Timeout())));
4115source.SetException(ADP.ExceptionWithStackTrace(ADP.AsyncOperationPending()));
4141return ADP.CreatedTaskWithCancellation<int>();
4145return ADP.CreatedTaskWithException<int>(ADP.ExceptionWithStackTrace(ADP.IO(SQLMessage.Timeout())));
4191return ADP.CreatedTaskWithException<bool>(ADP.ExceptionWithStackTrace(ADP.DataReaderClosed("ReadAsync")));
4196return ADP.CreatedTaskWithCancellation<bool>();
4201return ADP.CreatedTaskWithException<bool>(ADP.ExceptionWithStackTrace(SQL.PendingBeginXXXExists()));
4233return ADP.TrueTask;
4240return ADP.TrueTask;
4245return ADP.FalseTask;
4257if (!ADP.IsCatchableExceptionType(ex)) {
4260return ADP.CreatedTaskWithException<bool>(ex);
4266source.SetException(ADP.ExceptionWithStackTrace(SQL.PendingBeginXXXExists()));
4296return more ? ADP.TrueTask : ADP.FalseTask;
4309return ADP.TrueTask;
4330if (!ADP.IsCatchableExceptionType(ex)) {
4333return ADP.CreatedTaskWithException<bool>(ex);
4340return data[i].IsNull ? ADP.TrueTask : ADP.FalseTask;
4344return ADP.CreatedTaskWithException<bool>(ADP.ExceptionWithStackTrace(ADP.DataReaderClosed("IsDBNullAsync")));
4350return ADP.CreatedTaskWithException<bool>(ADP.ExceptionWithStackTrace(ADP.AsyncOperationPending()));
4355return ADP.CreatedTaskWithCancellation<bool>();
4366return _data[i].IsNull ? ADP.TrueTask : ADP.FalseTask;
4376if (!ADP.IsCatchableExceptionType(ex)) {
4379return ADP.CreatedTaskWithException<bool>(ex);
4386source.SetException(ADP.ExceptionWithStackTrace(ADP.AsyncOperationPending()));
4414return _data[i].IsNull ? ADP.TrueTask : ADP.FalseTask;
4440return ADP.CreatedTaskWithException<T>(ADP.ExceptionWithStackTrace(ADP.DataReaderClosed("GetFieldValueAsync")));
4444if (!ADP.IsCatchableExceptionType(ex)) {
4447return ADP.CreatedTaskWithException<T>(ex);
4452return ADP.CreatedTaskWithException<T>(ADP.ExceptionWithStackTrace(ADP.AsyncOperationPending()));
4457return ADP.CreatedTaskWithCancellation<T>();
4477if (!ADP.IsCatchableExceptionType(ex)) {
4480return ADP.CreatedTaskWithException<T>(ex);
4487source.SetException(ADP.ExceptionWithStackTrace(ADP.AsyncOperationPending()));
4571source.TrySetException(ADP.ExceptionWithStackTrace(ADP.ClosedConnectionError()));
4614source.SetException(ADP.ExceptionWithStackTrace(ADP.ClosedConnectionError()));
4627task = ADP.CreatedTaskWithException<T>(ex);
fx\src\data\System\Data\SqlClient\SqlDependencyListener.cs (38)
186if (!ADP.IsCatchableExceptionType(e)) {
190ADP.TraceExceptionWithoutRethrow(e); // Discard failure, but trace for now.
263Debug.Assert(!ADP.IsEmpty(appDomainKey), "Unexpected empty appDomainKey!");
331if (!ADP.IsCatchableExceptionType(e)) {
339ADP.TraceExceptionWithoutRethrow(e); // Discard failure, but trace for now.
394if (!ADP.IsCatchableExceptionType(e)) {
397ADP.TraceExceptionWithoutRethrow(e);
406if (!ADP.IsCatchableExceptionType(f)) {
409ADP.TraceExceptionWithoutRethrow(f); // Discard failure, but trace for now.
461if (!ADP.IsCatchableExceptionType(e)) {
464ADP.TraceExceptionWithoutRethrow(e); // Discard failure, but trace for now.
543if (!ADP.IsCatchableExceptionType(e)) {
546ADP.TraceExceptionWithoutRethrow(e); // Discard failure. User event could throw exception.
618if (!ADP.IsCatchableExceptionType(e)) {
621ADP.TraceExceptionWithoutRethrow(e); // Discard close failure, if it occurs. Only trace it.
658if (!ADP.IsCatchableExceptionType(e)) {
661ADP.TraceExceptionWithoutRethrow(e); // Discard failure, but trace for now.
695if (!ADP.IsCatchableExceptionType(e)) {
698ADP.TraceExceptionWithoutRethrow(e);
713if (!ADP.IsCatchableExceptionType(f)) {
716ADP.TraceExceptionWithoutRethrow(f); // Discard exception from Invalidate. User events can throw.
723if (!ADP.IsCatchableExceptionType(f)) {
726ADP.TraceExceptionWithoutRethrow(f); // Discard close failure, if it occurs. Only trace it.
794if (!ADP.IsCatchableExceptionType(e)) {
797ADP.TraceExceptionWithoutRethrow(e); // Discard failure, if it should occur.
886if (!ADP.IsCatchableExceptionType(e)) {
889ADP.TraceExceptionWithoutRethrow(e); // Discard failure.
906if (!ADP.IsCatchableExceptionType(e)) {
909ADP.TraceExceptionWithoutRethrow(e); // Discard failure.
989if (!ADP.IsCatchableExceptionType(e)) {
992ADP.TraceExceptionWithoutRethrow(e); // Discard failure, if it should occur.
1004if (!ADP.IsCatchableExceptionType(e)) {
1007ADP.TraceExceptionWithoutRethrow(e); // Discard failure, if it should occur.
1034if (!ADP.IsCatchableExceptionType(e)) {
1037ADP.TraceExceptionWithoutRethrow(e); // Discard failure, if it should occur.
1046ADP.TraceExceptionWithoutRethrow(e); // Discard failure, but trace.
1363if (!ADP.IsCatchableExceptionType(f)) {
1366ADP.TraceExceptionWithoutRethrow(f); // Discard failure, but trace.
fx\src\data\System\Data\SqlClient\SqlEnums.cs (12)
250default: throw ADP.DbTypeNotSupported(target, typeof(SqlDbType)); // no direct mapping, error out
286case TypeCode.Empty: throw ADP.InvalidDataType(TypeCode.Empty);
366throw ADP.UnknownDataType(dataType);
368case TypeCode.DBNull: throw ADP.InvalidDataType(TypeCode.DBNull);
370case TypeCode.Char: throw ADP.InvalidDataType(TypeCode.Char);
371case TypeCode.SByte: throw ADP.InvalidDataType(TypeCode.SByte);
374case TypeCode.UInt16: throw ADP.InvalidDataType(TypeCode.UInt16);
376case TypeCode.UInt32: throw ADP.InvalidDataType(TypeCode.UInt32);
378case TypeCode.UInt64: throw ADP.InvalidDataType(TypeCode.UInt64);
384default: throw ADP.UnknownDataTypeCode(dataType, Type.GetTypeCode(dataType));
427if (ADP.IsNull(sqlVal))
734(255, 255, -1, false, false, false, TdsEnums.SQLVARBINARY, TdsEnums.SQLBIGBINARY, ADP.StrEmpty, typeof(System.Byte[]), typeof(SqlBinary), TdsEnums.SmallVarBinary, DbType.Binary, 2);
fx\src\data\System\Data\SqlClient\SqlUtil.cs (297)
234return ADP.InvalidOperation(Res.GetString(Res.SQL_CannotGetDTCAddress));
238return ADP.Argument(Res.GetString(Res.SQL_InvalidOptionLength, key));
241return ADP.ArgumentOutOfRange (str);
244return ADP.ArgumentOutOfRange (Res.GetString(Res.SQL_InvalidTDSPacketSize));
247return ADP.Argument(Res.GetString(Res.SQL_InvalidPacketSizeValue));
250return ADP.Argument(Res.GetString(Res.SQL_InvalidSSPIPacketSize));
253return ADP.Argument(Res.GetString(Res.SQL_NullEmptyTransactionName));
256return ADP.Argument(Res.GetString(Res.SQL_SnapshotNotSupported, typeof(IsolationLevel), level.ToString()));
259return ADP.Argument(Res.GetString(Res.SQL_UserInstanceFailoverNotCompatible));
262return ADP.InvalidOperation(Res.GetString(Res.SQL_CredentialsNotProvided, DbConnectionStringBuilderUtil.AuthenticationTypeToString(auth)));
265return ADP.Argument(Res.GetString(Res.SQL_AuthenticationAndIntegratedSecurity));
268return ADP.Argument(Res.GetString(Res.SQL_IntegratedWithUserIDAndPassword));
271return ADP.Argument(Res.GetString(Res.SQL_InteractiveWithoutUserID));
274return ADP.Argument(Res.GetString(Res.SQL_InteractiveWithPassword));
277return ADP.InvalidOperation(Res.GetString(Res.SQL_SettingIntegratedWithCredential));
280return ADP.Argument(Res.GetString(Res.SQL_SettingCredentialWithIntegrated));
283return ADP.InvalidOperation(Res.GetString(Res.SQL_SettingCredentialWithIntegrated));
286return ADP.DataAdapter(Res.GetString(Res.SQL_InvalidSQLServerVersionUnknown));
292return ADP.InvalidOperation(Res.GetString(Res.SQL_ConnectionLockedForBcpEvent));
295return ADP.InvalidOperation(Res.GetString(Res.SQL_AsyncConnectionRequired));
298return ADP.InvalidOperation(Res.GetString(Res.SQL_FatalTimeout));
301return ADP.InvalidOperation(Res.GetString(Res.SQL_InstanceFailure));
304return ADP.ArgumentNull(Res.GetString(Res.SQL_ChangePasswordArgumentMissing, argumentName));
307return ADP.Argument(Res.GetString(Res.SQL_ChangePasswordConflictsWithSSPI));
310return ADP.InvalidOperation(Res.GetString(Res.SQL_ChangePasswordRequiresYukon));
313return ADP.InvalidOperation(Res.GetString(Res.SQL_UnknownSysTxIsolationLevel, isolationLevel.ToString()));
316return ADP.InvalidOperation(Res.GetString(Res.SQL_ChangePasswordUseOfUnallowedKey, key));
319return ADP.InvalidOperation(Res.GetString(Res.SQL_InvalidPartnerConfiguration, server, database));
322return ADP.InvalidOperation(Res.GetString(Res.TCE_BatchedUpdateColumnEncryptionSettingMismatch, "SqlCommandColumnEncryptionSetting", "SelectCommand", "InsertCommand", "UpdateCommand", "DeleteCommand"));
325return ADP.InvalidOperation(Res.GetString(Res.SQL_MarsUnsupportedOnConnection));
329return ADP.InvalidOperation(Res.GetString(Res.SQL_CannotModifyPropertyAsyncOperationInProgress, property));
332return ADP.NotSupported(Res.GetString(Res.SQL_NonLocalSSEInstance));
338return ADP.NotSupported(Res.GetString(Res.SQL_UnsupportedAuthentication, authentication));
342return ADP.NotSupported(Res.GetString(Res.SQL_UnsupportedSqlAuthenticationMethod, authentication));
346return ADP.Argument(Res.GetString(Res.SQL_CannotCreateAuthProvider, authentication, type), e);
350return ADP.Argument(Res.GetString(Res.SQL_CannotCreateAuthInitializer, type), e);
354return ADP.InvalidOperation(Res.GetString(Res.SQL_CannotInitializeAuthProvider, type), e);
358return ADP.NotSupported(Res.GetString(Res.SQL_UnsupportedAuthenticationByProvider, type, authentication));
362return ADP.Argument(Res.GetString(Res.SQL_CannotFindAuthProvider, authentication));
366return ADP.InvalidOperation(Res.GetString(Res.SQL_CannotGetAuthProviderConfig), e);
370return ADP.ArgumentNull(Res.GetString(Res.SQL_ParameterCannotBeEmpty, paramName));
377return ADP.NotSupported(Res.GetString(Res.SQL_NotificationsRequireYukon));
381return ADP.ArgumentOutOfRange(Res.GetString(Res.SQL_NotSupportedEnumerationValue, type.Name, value.ToString(System.Globalization.CultureInfo.InvariantCulture)), type.Name);
422Exception exception = ADP.InvalidOperation(Res.GetString(Res.SQL_OperationCancelled));
427return ADP.InvalidOperation(Res.GetString(Res.SQL_PendingBeginXXXExists));
431return ADP.ArgumentOutOfRange(Res.GetString(Res.SqlDependency_InvalidTimeout), param);
435return ADP.InvalidOperation(Res.GetString(Res.SQL_NonXmlResult));
442return ADP.Argument(Res.GetString(Res.SQL_InvalidUdt3PartNameFormat));
445return ADP.Argument(Res.GetString(Res.SQL_InvalidParameterTypeNameFormat));
448return ADP.Argument(Res.GetString(Res.SQL_InvalidParameterNameLength, value));
451return ADP.Argument(Res.GetString(Res.SQL_PrecisionValueOutOfRange, precision.ToString(CultureInfo.InvariantCulture)));
454return ADP.Argument(Res.GetString(Res.SQL_ScaleValueOutOfRange, scale.ToString(CultureInfo.InvariantCulture)));
457return ADP.Argument(Res.GetString(Res.SQL_TimeScaleValueOutOfRange, scale.ToString(CultureInfo.InvariantCulture)));
460return ADP.InvalidEnumerationValue(typeof(SqlDbType), (int) value);
463return ADP.NotSupported(Res.GetString(Res.SqlParameter_UnsupportedTVPOutputParameter,
467return ADP.NotSupported(Res.GetString(Res.SqlParameter_DBNullNotSupportedForTVP, paramName));
470return ADP.InvalidOperation(Res.GetString(Res.SqlParameter_InvalidTableDerivedPrecisionForTvp, precision, columnName, System.Data.SqlTypes.SqlDecimal.MaxPrecision));
473return ADP.NotSupported(Res.GetString(Res.SqlParameter_UnexpectedTypeNameForNonStruct, paramName));
476return ADP.NotSupported(Res.GetString(Res.MetaType_SingleValuedStructNotSupported));
479return ADP.InvalidOperation(Res.GetString(Res.SQL_ParameterInvalidVariant, paramName));
483return ADP.Argument(Res.GetString(Res.SQL_ParameterTypeNameRequired, paramType, paramName));
486return ADP.Argument(Res.GetString(Res.NullSchemaTableDataTypeNotSupported, columnName));
489return ADP.Argument(Res.GetString(Res.InvalidSchemaTableOrdinals));
492return ADP.Argument(Res.GetString(Res.SQL_EnumeratedRecordMetaDataChanged, fieldName, recordNumber));
495return ADP.Argument(Res.GetString(Res.SQL_EnumeratedRecordFieldCountChanged, recordNumber));
506return ADP.InvalidOperation(Res.GetString(Res.SQL_InvalidTDSVersion));
509return ADP.InvalidOperation(Res.GetString(Res.SQL_ParsingErrorWithState, ((int)state).ToString(CultureInfo.InvariantCulture)));
512return ADP.InvalidOperation(Res.GetString(Res.SQL_ParsingErrorWithState, ((int)state).ToString(CultureInfo.InvariantCulture)), innerException);
515return ADP.InvalidOperation(Res.GetString(Res.SQL_ParsingErrorValue, ((int)state).ToString(CultureInfo.InvariantCulture), value));
518return ADP.InvalidOperation(Res.GetString(Res.SQL_ParsingErrorOffset, ((int)state).ToString(CultureInfo.InvariantCulture), offset));
521return ADP.InvalidOperation(Res.GetString(Res.SQL_ParsingErrorFeatureId, ((int)state).ToString(CultureInfo.InvariantCulture), featureId));
524return ADP.InvalidOperation(Res.GetString(Res.SQL_ParsingErrorToken, ((int)state).ToString(CultureInfo.InvariantCulture), token));
527return ADP.InvalidOperation(Res.GetString(Res.SQL_ParsingErrorLength, ((int)state).ToString(CultureInfo.InvariantCulture), length));
530return ADP.InvalidOperation(Res.GetString(Res.SQL_ParsingErrorStatus, ((int)state).ToString(CultureInfo.InvariantCulture), status));
533return ADP.InvalidOperation(Res.GetString(Res.SQL_ParsingErrorAuthLibraryType, ((int)state).ToString(CultureInfo.InvariantCulture), libraryType));
537return ADP.Overflow(Res.GetString(Res.SQL_MoneyOverflow, moneyValue));
540return ADP.Overflow(Res.GetString(Res.SQL_SmallDateTimeOverflow, datetime));
543return ADP.InvalidOperation(Res.GetString(Res.SQL_SNIPacketAllocationFailure));
546return ADP.Overflow(Res.GetString(Res.SQL_TimeOverflow, time));
553return ADP.InvalidOperation(Res.GetString(Res.SQL_InvalidRead));
557return ADP.InvalidCast(Res.GetString(Res.SQL_NonBlobColumn, columnName));
561return ADP.InvalidCast(Res.GetString(Res.SQL_NonCharColumn, columnName));
565return ADP.InvalidCast(Res.GetString(Res.SQL_StreamNotSupportOnColumnType, columnName));
569return ADP.InvalidOperation(Res.GetString(Res.TCE_StreamNotSupportOnEncryptedColumn, columnName, "Stream"));
573return ADP.InvalidOperation(Res.GetString(Res.TCE_SequentialAccessNotSupportedOnEncryptedColumn, columnName, "CommandBehavior=SequentialAccess"));
577return ADP.InvalidCast(Res.GetString(Res.SQL_TextReaderNotSupportOnColumnType, columnName));
581return ADP.InvalidCast(Res.GetString(Res.SQL_XmlReaderNotSupportOnColumnType, columnName));
585return ADP.TypeLoad(Res.GetString(Res.SQLUDT_Unexpected,exceptionText));
599ADP.TraceExceptionAsReturnValue(e);
607return ADP.InvalidOperation(Res.GetString(Res.SQLNotify_AlreadyHasCommand));
611return ADP.InvalidOperation(Res.GetString(Res.SqlNotify_SqlDepCannotBeCreatedInProc));
615return ADP.InvalidOperation(Res.GetString(Res.SqlDependency_DefaultOptionsButNoStart));
619return ADP.InvalidOperation(Res.GetString(Res.SqlDependency_DatabaseBrokerDisabled));
623return ADP.InvalidOperation(Res.GetString(Res.SqlDependency_EventNoDuplicate));
627return ADP.InvalidOperation(Res.GetString(Res.SqlDependency_DuplicateStart));
632return ADP.InvalidOperation(Res.GetString(Res.SqlDependency_IdMismatch));
636return ADP.InvalidOperation(Res.GetString(Res.SqlDependency_NoMatchingServerStart));
640return ADP.InvalidOperation(Res.GetString(Res.SqlDependency_NoMatchingServerDatabaseStart));
644return ADP.InvalidOperation(Res.GetString(Res.SQLNotify_ErrorFormat, notify.Type,notify.Info,notify.Source));
651return ADP.InvalidOperation(Res.GetString(Res.SqlMetaData_NoMetadata));
655return ADP.Argument(Res.GetString(Res.SQLUDT_InvalidUdtTypeName));
659return ADP.Argument(Res.GetString(Res.SQLUDT_UnexpectedUdtTypeName));
663return ADP.Argument(Res.GetString(Res.SQLUDT_InvalidSqlType, typeName));
667return ADP.Argument(Res.GetString(Res.SqlMetaData_InvalidSqlDbTypeForConstructorFormat, type.ToString()));
671return ADP.Argument(Res.GetString(Res.SqlMetaData_NameTooLong), parameterName);
675return ADP.InvalidEnumerationValue(typeof(SortOrder), (int)order);
679return ADP.InvalidOperation(Res.GetString(Res.SqlMetaData_SpecifyBothSortOrderAndOrdinal, order.ToString(), ordinal));
683return ADP.Argument(Res.GetString(Res.SQLTVP_TableTypeCanOnlyBeParameter));
686return ADP.Argument(Res.GetString(Res.SqlProvider_InvalidDataColumnType, columnName, typeName));
689return ADP.Argument(Res.GetString(Res.SqlProvider_InvalidDataColumnMaxLength, columnName, maxLength));
692return ADP.Argument(Res.GetString(Res.SqlMisc_InvalidPrecScaleMessage));
695return ADP.Argument(Res.GetString(Res.SqlProvider_NotEnoughColumnsInStructuredType));
698return ADP.InvalidOperation(Res.GetString(Res.SqlProvider_DuplicateSortOrdinal, sortOrdinal));
701return ADP.InvalidOperation(Res.GetString(Res.SqlProvider_MissingSortOrdinal, sortOrdinal));
704return ADP.InvalidOperation(Res.GetString(Res.SqlProvider_SortOrdinalGreaterThanFieldCount, sortOrdinal, columnOrdinal));
707return ADP.Argument(Res.GetString(Res.IEnumerableOfSqlDataRecordHasNoRows));
716return ADP.InvalidOperation(Res.GetString(Res.SqlPipe_CommandHookedUpToNonContextConnection));
720return ADP.Argument(Res.GetString(Res.SqlPipe_MessageTooLong, messageLength));
724return ADP.InvalidOperation(Res.GetString(Res.SqlPipe_IsBusy));
728return ADP.InvalidOperation(Res.GetString(Res.SqlPipe_AlreadyHasAnOpenResultSet, methodName));
732return ADP.InvalidOperation(Res.GetString(Res.SqlPipe_DoesNotHaveAnOpenResultSet, methodName));
740return ADP.InvalidOperation(Res.GetString(Res.SQL_SqlResultSetClosed2));
742return ADP.InvalidOperation(Res.GetString(Res.SQL_SqlResultSetClosed, methodname));
745return ADP.InvalidOperation(Res.GetString(Res.ADP_DataReaderNoData, methodname));
749return ADP.InvalidOperation(Res.GetString(Res.SQL_SqlRecordReadOnly2));
751return ADP.InvalidOperation(Res.GetString(Res.SQL_SqlRecordReadOnly, methodname));
756return ADP.InvalidOperation(Res.GetString(Res.SQL_SqlResultSetRowDeleted2));
758return ADP.InvalidOperation(Res.GetString(Res.SQL_SqlResultSetRowDeleted, methodname));
762return ADP.InvalidOperation(Res.GetString(Res.SQL_SqlResultSetCommandNotInSameConnection));
766return ADP.InvalidOperation(Res.GetString(Res.SQL_SqlResultSetNoAcceptableCursor));
773return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadMappingInaccessible));
776return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadMappingsNamesOrOrdinalsOnly));
779return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadCannotConvertValue, sourcetype.Name, metatype.TypeName), e);
782return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadNonMatchingColumnMapping));
788return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadNonMatchingColumnName, columnName), e);
791return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadStringTooLong));
794return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadInvalidVariantValue));
797return ADP.Argument(Res.GetString(Res.SQL_BulkLoadInvalidTimeout, timeout.ToString(CultureInfo.InvariantCulture)));
800return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadExistingTransaction));
803return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadNoCollation));
806return ADP.Argument(Res.GetString(Res.SQL_BulkLoadConflictingTransactionOption));
809return ADP.InvalidOperation (Res.GetString (Res.Sql_BulkLoadLcidMismatch, sourceLcid, sourceColumnName, destinationLcid, destinationColumnName));
812return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadInvalidOperationInsideEvent));
815return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadMissingDestinationTable));
818return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadInvalidDestinationTable, tableName), inner);
821return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadNotAllowDBNull, columnName));
824return ADP.InvalidOperation(Res.GetString(Res.SQL_BulkLoadPendingOperation));
832return ADP.Argument(Res.GetString(Res.TCE_InvalidKeyEncryptionAlgorithmSysErr, encryptionAlgorithm, validEncryptionAlgorithm), TdsEnums.TCE_PARAM_ENCRYPTION_ALGORITHM);
835return ADP.Argument(Res.GetString(Res.TCE_InvalidKeyEncryptionAlgorithm, encryptionAlgorithm, validEncryptionAlgorithm), TdsEnums.TCE_PARAM_ENCRYPTION_ALGORITHM);
841return ADP.ArgumentNull (TdsEnums.TCE_PARAM_ENCRYPTION_ALGORITHM, Res.GetString(Res.TCE_NullKeyEncryptionAlgorithmSysErr));
844return ADP.ArgumentNull (TdsEnums.TCE_PARAM_ENCRYPTION_ALGORITHM, Res.GetString(Res.TCE_NullKeyEncryptionAlgorithm));
849return ADP.Argument(Res.GetString(Res.TCE_EmptyColumnEncryptionKey), TdsEnums.TCE_PARAM_COLUMNENCRYPTION_KEY);
853return ADP.ArgumentNull(TdsEnums.TCE_PARAM_COLUMNENCRYPTION_KEY, Res.GetString(Res.TCE_NullColumnEncryptionKey));
857return ADP.Argument(Res.GetString(Res.TCE_EmptyEncryptedColumnEncryptionKey), TdsEnums.TCE_PARAM_ENCRYPTED_CEK);
861return ADP.ArgumentNull(TdsEnums.TCE_PARAM_ENCRYPTED_CEK, Res.GetString(Res.TCE_NullEncryptedColumnEncryptionKey));
866return ADP.Argument(Res.GetString(Res.TCE_LargeCertificatePathLengthSysErr, actualLength, maxLength), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
869return ADP.Argument(Res.GetString(Res.TCE_LargeCertificatePathLength, actualLength, maxLength), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
876return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, Res.GetString(Res.TCE_NullCertificatePathSysErr, validLocations[0], validLocations[1], @"/"));
879return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, Res.GetString(Res.TCE_NullCertificatePath, validLocations[0], validLocations[1], @"/"));
885return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, Res.GetString(Res.TCE_NullCspPathSysErr, @"/"));
888return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, Res.GetString(Res.TCE_NullCspPath, @"/"));
894return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, Res.GetString(Res.TCE_NullCngPathSysErr, @"/"));
897return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, Res.GetString(Res.TCE_NullCngPath, @"/"));
904return ADP.Argument(Res.GetString(Res.TCE_InvalidCertificatePathSysErr, actualCertificatePath, validLocations[0], validLocations[1], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
907return ADP.Argument(Res.GetString(Res.TCE_InvalidCertificatePath, actualCertificatePath, validLocations[0], validLocations[1], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
913return ADP.Argument(Res.GetString(Res.TCE_InvalidCspPathSysErr, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
916return ADP.Argument(Res.GetString(Res.TCE_InvalidCspPath, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
922return ADP.Argument(Res.GetString(Res.TCE_InvalidCngPathSysErr, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
925return ADP.Argument(Res.GetString(Res.TCE_InvalidCngPath, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
931return ADP.Argument(Res.GetString(Res.TCE_EmptyCspNameSysErr, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
934return ADP.Argument(Res.GetString(Res.TCE_EmptyCspName, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
940return ADP.Argument(Res.GetString(Res.TCE_EmptyCngNameSysErr, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
943return ADP.Argument(Res.GetString(Res.TCE_EmptyCngName, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
949return ADP.Argument(Res.GetString(Res.TCE_EmptyCspKeyIdSysErr, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
952return ADP.Argument(Res.GetString(Res.TCE_EmptyCspKeyId, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
958return ADP.Argument(Res.GetString(Res.TCE_EmptyCngKeyIdSysErr, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
961return ADP.Argument(Res.GetString(Res.TCE_EmptyCngKeyId, masterKeyPath, @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
967return ADP.Argument(Res.GetString(Res.TCE_InvalidCspNameSysErr, cspName, masterKeyPath), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
970return ADP.Argument(Res.GetString(Res.TCE_InvalidCspName, cspName, masterKeyPath), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
976return ADP.Argument(Res.GetString(Res.TCE_InvalidCspKeyIdSysErr, keyIdentifier, masterKeyPath), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
979return ADP.Argument(Res.GetString(Res.TCE_InvalidCspKeyId, keyIdentifier, masterKeyPath), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
985return ADP.Argument(Res.GetString(Res.TCE_InvalidCngKeySysErr, masterKeyPath, cngProviderName, keyIdentifier), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
988return ADP.Argument(Res.GetString(Res.TCE_InvalidCngKey, masterKeyPath, cngProviderName, keyIdentifier), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
995return ADP.Argument(Res.GetString(Res.TCE_InvalidCertificateLocationSysErr, certificateLocation, certificatePath, validLocations[0], validLocations[1], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
998return ADP.Argument(Res.GetString(Res.TCE_InvalidCertificateLocation, certificateLocation, certificatePath, validLocations[0], validLocations[1], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
1004return ADP.Argument(Res.GetString(Res.TCE_InvalidCertificateStoreSysErr, certificateStore, certificatePath, validCertificateStore), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
1007return ADP.Argument(Res.GetString(Res.TCE_InvalidCertificateStore, certificateStore, certificatePath, validCertificateStore), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
1013return ADP.Argument(Res.GetString(Res.TCE_EmptyCertificateThumbprintSysErr, certificatePath), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
1016return ADP.Argument(Res.GetString(Res.TCE_EmptyCertificateThumbprint, certificatePath), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
1022return ADP.Argument(Res.GetString(Res.TCE_CertificateNotFoundSysErr, thumbprint, certificateLocation, certificateStore), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
1025return ADP.Argument(Res.GetString(Res.TCE_CertificateNotFound, thumbprint, certificateLocation, certificateStore), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
1030return ADP.Argument(Res.GetString(Res.TCE_InvalidAlgorithmVersionInEncryptedCEK, actual.ToString(@"X2"), expected.ToString(@"X2")), TdsEnums.TCE_PARAM_ENCRYPTED_CEK);
1034return ADP.Argument(Res.GetString(Res.TCE_InvalidCiphertextLengthInEncryptedCEK, actual, expected, certificateName), TdsEnums.TCE_PARAM_ENCRYPTED_CEK);
1038return ADP.Argument(Res.GetString(Res.TCE_InvalidCiphertextLengthInEncryptedCEKCsp, actual, expected, masterKeyPath), TdsEnums.TCE_PARAM_ENCRYPTED_CEK);
1042return ADP.Argument(Res.GetString(Res.TCE_InvalidCiphertextLengthInEncryptedCEKCng, actual, expected, masterKeyPath), TdsEnums.TCE_PARAM_ENCRYPTED_CEK);
1046return ADP.Argument(Res.GetString(Res.TCE_InvalidSignatureInEncryptedCEK, actual, expected, masterKeyPath), TdsEnums.TCE_PARAM_ENCRYPTED_CEK);
1050return ADP.Argument(Res.GetString(Res.TCE_InvalidSignatureInEncryptedCEKCsp, actual, expected, masterKeyPath), TdsEnums.TCE_PARAM_ENCRYPTED_CEK);
1054return ADP.Argument(Res.GetString(Res.TCE_InvalidSignatureInEncryptedCEKCng, actual, expected, masterKeyPath), TdsEnums.TCE_PARAM_ENCRYPTED_CEK);
1058return ADP.Argument(Res.GetString(Res.TCE_InvalidCertificateSignature, certificatePath), TdsEnums.TCE_PARAM_ENCRYPTED_CEK);
1062return ADP.Argument(Res.GetString(Res.TCE_InvalidSignature, masterKeyPath), TdsEnums.TCE_PARAM_ENCRYPTED_CEK);
1067return ADP.Argument(Res.GetString(Res.TCE_CertificateWithNoPrivateKeySysErr, keyPath), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
1070return ADP.Argument(Res.GetString(Res.TCE_CertificateWithNoPrivateKey, keyPath), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
1078return ADP.ArgumentNull(TdsEnums.TCE_PARAM_ENCRYPTIONKEY,Res.GetString(Res.TCE_NullColumnEncryptionKeySysErr));
1082return ADP.Argument(Res.GetString(
1091return ADP.Argument(Res.GetString(
1099return ADP.ArgumentNull (Res.GetString(Res.TCE_NullPlainText));
1103return ADP.Argument(Res.GetString(Res.TCE_VeryLargeCiphertext, cipherTextLength, maxCipherTextSize, plainTextLength));
1107return ADP.ArgumentNull (Res.GetString(Res.TCE_NullCipherText));
1111return ADP.Argument(Res.GetString(Res.TCE_InvalidCipherTextSize, actualSize, minimumSize), TdsEnums.TCE_PARAM_CIPHERTEXT);
1115return ADP.Argument(Res.GetString(Res.TCE_InvalidAlgorithmVersion, actual.ToString(@"X2"), expected.ToString(@"X2")), TdsEnums.TCE_PARAM_CIPHERTEXT);
1119return ADP.Argument(Res.GetString(Res.TCE_InvalidAuthenticationTag), TdsEnums.TCE_PARAM_CIPHERTEXT);
1123return ADP.ArgumentNull (TdsEnums.TCE_PARAM_ENCRYPTION_ALGORITHM, Res.GetString(Res.TCE_NullColumnEncryptionAlgorithm, supportedAlgorithms));
1130return ADP.Argument (Res.GetString(Res.TCE_UnexpectedDescribeParamFormatParameterMetadata, "sp_describe_parameter_encryption"));
1134return ADP.Argument (Res.GetString(Res.TCE_UnexpectedDescribeParamFormatAttestationInfo, "sp_describe_parameter_encryption", enclaveType));
1138return ADP.InvalidOperation(Res.GetString(Res.TCE_InvalidEncryptionKeyOrdinalEnclaveMetadata, ordinal, maxOrdinal));
1141return ADP.InvalidOperation(Res.GetString(Res.TCE_InvalidEncryptionKeyOrdinalParameterMetadata, ordinal, maxOrdinal));
1145return ADP.InvalidOperation(Res.GetString(Res.TCE_MultipleRowsReturnedForAttestationInfo, "sp_describe_parameter_encryption"));
1149return ADP.Argument (Res.GetString(Res.TCE_ParamEncryptionMetaDataMissing, "sp_describe_parameter_encryption", paramName, procedureName));
1153return ADP.InvalidOperation(Res.GetString(Res.TCE_ParamInvalidForceColumnEncryptionSetting, TdsEnums.TCE_PARAM_FORCE_COLUMN_ENCRYPTION, paramName, procedureName, "SqlParameter"));
1157return ADP.InvalidOperation(Res.GetString(Res.TCE_ParamUnExpectedEncryptionMetadata, paramName, procedureName, TdsEnums.TCE_PARAM_FORCE_COLUMN_ENCRYPTION, "SqlParameter"));
1161return ADP.Argument (Res.GetString(Res.TCE_ProcEncryptionMetaDataMissing, "sp_describe_parameter_encryption", procedureName));
1168return ADP.Argument(Res.GetString(Res.TCE_InvalidKeyStoreProviderName, providerName, systemProviderStr, customProviderStr));
1173return ADP.InvalidOperation(Res.GetString(Res.TCE_UnableToVerifyColumnMasterKeySignature, innerExeption.Message), innerExeption);
1177return ADP.InvalidOperation(Res.GetString(Res.TCE_ColumnMasterKeySignatureVerificationFailed, cmkPath));
1181return ADP.Argument(Res.GetString(Res.TCE_ColumnMasterKeySignatureNotFound, cmkPath));
1188return ADP.InvalidOperation(Res.GetString(Res.TCE_ExceptionWhenGeneratingEnclavePackage, innerExeption.Message), innerExeption);
1192return ADP.InvalidOperation(Res.GetString(Res.TCE_FailedToEncryptRegisterRulesBytePackage, innerExeption.Message), innerExeption);
1196return ADP.Argument(Res.GetString(Res.TCE_InvalidKeyIdUnableToCastToUnsignedShort, keyId, innerException.Message), innerException);
1200return ADP.Argument(Res.GetString(Res.TCE_InvalidDatabaseIdUnableToCastToUnsignedInt, databaseId, innerException.Message), innerException);
1204return ADP.Argument(Res.GetString(Res.TCE_InvalidAttestationParameterUnableToConvertToUnsignedInt, enclaveType, intValue, variableName, innerException.Message), innerException);
1208return ADP.Argument(Res.GetString(Res.TCE_OffsetOutOfBounds, type, method));
1212return ADP.Argument(Res.GetString(Res.TCE_InsufficientBuffer, argument, type, method));
1216return ADP.Argument(Res.GetString(Res.TCE_ColumnEncryptionKeysNotFound));
1224return ADP.Argument(Res.GetString(Res.TCE_AttestationInfoNotReturnedFromSQLServer, enclaveType, enclaveAttestationUrl));
1231return ADP.ArgumentNull(argumentName, Res.GetString(Res.TCE_NullArgumentInConstructorInternal, argumentName, objectUnderConstruction));
1235return ADP.Argument(Res.GetString(Res.TCE_EmptyArgumentInConstructorInternal, argumentName, objectUnderConstruction));
1239return ADP.ArgumentNull(argumentName, Res.GetString(Res.TCE_NullArgumentInternal, argumentName, type, method));
1243return ADP.Argument(Res.GetString(Res.TCE_EmptyArgumentInternal, argumentName, type, method));
1250return ADP.InvalidOperation(Res.GetString(Res.TCE_CannotGetSqlColumnEncryptionEnclaveProviderConfig, innerException.Message), innerException);
1254return ADP.InvalidOperation(Res.GetString(Res.TCE_CannotCreateSqlColumnEncryptionEnclaveProvider, providerName, type, innerException.Message), innerException);
1258return ADP.InvalidOperation(Res.GetString(Res.TCE_SqlColumnEncryptionEnclaveProviderNameCannotBeEmpty));
1262return ADP.InvalidOperation(Res.GetString(Res.TCE_NoAttestationUrlSpecifiedForEnclaveBasedQuerySpDescribe, "sp_describe_parameter_encryption", enclaveType));
1266return ADP.InvalidOperation(Res.GetString(Res.TCE_NoAttestationUrlSpecifiedForEnclaveBasedQueryGeneratingEnclavePackage, enclaveType));
1270return ADP.InvalidOperation(Res.GetString(Res.TCE_EnclaveTypeNullForEnclaveBasedQuery));
1274return ADP.InvalidOperation(Res.GetString(Res.TCE_EnclaveProvidersNotConfiguredForEnclaveBasedQuery));
1278return ADP.InvalidOperation(Res.GetString(Res.TCE_EnclaveProviderNotFound, enclaveType));
1282return ADP.InvalidOperation(Res.GetString(Res.TCE_NullEnclaveSessionReturnedFromProvider, enclaveType, attestationUrl));
1324return ADP.Argument(Res.GetString(Res.TCE_UnknownColumnEncryptionAlgorithm, algorithmName, supportedAlgorithms));
1328return ADP.Argument(Res.GetString(Res.TCE_UnknownColumnEncryptionAlgorithmId, algoId, supportAlgorithmIds), TdsEnums.TCE_PARAM_CIPHER_ALGORITHM_ID);
1332return ADP.Argument(Res.GetString(Res.TCE_UnsupportedNormalizationVersion, version, "'1'", "SQL Server"));
1339return ADP.Argument(Res.GetString(Res.TCE_UnrecognizedKeyStoreProviderName, providerName, systemProviderStr, customProviderStr));
1343return ADP.Argument(Res.GetString(Res.TCE_NullProviderValue, parameterName, actualDataType, expectedDataType));
1356return ADP.Argument(Res.GetString(Res.TCE_UntrustedKeyPath, keyPath, serverName));
1360return ADP.Argument(Res.GetString(Res.TCE_UnsupportedDatatype, dataType));
1368return ADP.Argument(Res.GetString(Res.TCE_NullEnclaveSessionDuringQueryExecution, enclaveType, enclaveAttestationUrl));
1372return ADP.Argument(Res.GetString(Res.TCE_NullEnclavePackageForEnclaveBasedQuery, enclaveType, enclaveAttestationUrl));
1379return ADP.InvalidOperation (Res.GetString (Res.TCE_NotSupportedByServer, "SQL Server"));
1383return ADP.InvalidOperation (Res.GetString (Res.TCE_EnclaveComputationsNotSupported));
1387return ADP.InvalidOperation (Res.GetString (Res.TCE_EnclaveTypeNotReturned));
1394return ADP.InvalidOperation(Res.GetString(Res.TCE_CanOnlyCallOnce));
1398return ADP.ArgumentNull(TdsEnums.TCE_PARAM_CLIENT_KEYSTORE_PROVIDERS, Res.GetString(Res.TCE_NullCustomKeyStoreProviderDictionary));
1402return ADP.Argument(Res.GetString(Res.TCE_InvalidCustomKeyStoreProviderName, providerName, prefix), TdsEnums.TCE_PARAM_CLIENT_KEYSTORE_PROVIDERS);
1406return ADP.ArgumentNull(TdsEnums.TCE_PARAM_CLIENT_KEYSTORE_PROVIDERS, Res.GetString(Res.TCE_NullProviderValue, providerName));
1410return ADP.ArgumentNull(TdsEnums.TCE_PARAM_CLIENT_KEYSTORE_PROVIDERS, Res.GetString(Res.TCE_EmptyProviderName));
1417return ADP.InvalidOperation(Res.GetString(Res.SQL_ConnectionDoomed));
1421return ADP.InvalidOperation(Res.GetString(Res.SQL_OpenResultCountExceeded));
1428return ADP.InvalidOperation(Res.GetString(Res.GT_Disabled));
1432return ADP.InvalidOperation(Res.GetString(Res.GT_UnsupportedSysTxVersion));
1466return ADP.Argument(msg);
1472return ADP.InvalidOperation(msg);
1477return ADP.Argument(msg);
1482return ADP.Argument(msg);
1490return ADP.Argument(Res.GetString(Res.SQLROR_FailoverNotSupported));
1603return ADP.InvalidOperation(Res.GetString(Res.SQL_BatchedUpdatesNotAvailableOnContextConnection));
1606return ADP.InvalidOperation(Res.GetString(Res.SQL_ContextAllowsLimitedKeywords));
1609return ADP.InvalidOperation(Res.GetString(Res.SQL_ContextAllowsOnlyTypeSystem2005));
1612return ADP.InvalidOperation(Res.GetString(Res.SQL_ContextConnectionIsInUse));
1615return ADP.InvalidOperation(Res.GetString(Res.SQL_ContextUnavailableOutOfProc));
1618return ADP.InvalidOperation(Res.GetString(Res.SQL_ContextUnavailableWhileInProc));
1621return ADP.InvalidOperation(Res.GetString(Res.SQL_NestedTransactionScopesNotSupported));
1624return ADP.InvalidOperation(Res.GetString(Res.SQL_NotAvailableOnContextConnection));
1627return ADP.InvalidOperation(Res.GetString(Res.SQL_NotificationsNotAvailableOnContextConnection));
1631return ADP.InvalidOperation(Res.GetString(Res.SQL_UnexpectedSmiEvent, (int)eventType));
1634return ADP.InvalidOperation(Res.GetString(Res.SQL_UserInstanceNotAvailableInProc));
1637return ADP.Argument( Res.GetString( Res.SQL_ArgumentLengthMismatch, arg1, arg2 ) );
1640return ADP.Argument( Res.GetString( Res.SQL_InvalidSqlDbTypeWithOneAllowedType, invalidType, method, allowedType ) );
1643return ADP.InvalidOperation(Res.GetString(Res.SQL_PipeErrorRequiresSendEnd));
1646return ADP.Argument(Res.GetString(Res.SQL_TooManyValues), arg);
1649return ADP.NotSupported(Res.GetString(Res.SQL_StreamWriteNotSupported));
1652return ADP.NotSupported(Res.GetString(Res.SQL_StreamReadNotSupported));
1655return ADP.NotSupported(Res.GetString(Res.SQL_StreamSeekNotSupported));
1659ADP.TraceExceptionAsReturnValue(e);
1665return ADP.InvalidOperation(Res.GetString(Res.OleDb_CommandParameterError, index.ToString(CultureInfo.InvariantCulture), "SqlParameter.Size"));
1668return ADP.InvalidOperation(Res.GetString(Res.SqlMisc_SubclassMustOverride));
1807Debug.Assert(!ADP.IsEmpty(name), "null or empty identifiers are not allowed");
1816Debug.Assert(!ADP.IsEmpty(name), "null or empty identifiers are not allowed");
1839if (ADP.IsEmpty(input)) {