Common\System\Data\Common\AdapterUtil.Odbc.cs (9)
194return ADP.InvalidOperation(SR.GetString(SR.ADP_InvalidDataDirectory));
232return ADP.InvalidOperation(SR.GetString(SR.ADP_PooledOpenTimeout));
237return ADP.TimeoutException(SR.GetString(SR.ADP_NonPooledOpenTimeout));
266return InvalidOperation(SR.GetString(SR.ADP_OpenConnectionRequired, method, ADP.ConnectionStateMsg(state)));
298return Argument(SR.GetString(SR.ADP_InvalidCommandTimeout, value.ToString(CultureInfo.InvariantCulture)), ADP.CommandTimeout);
326return InvalidOperation(SR.GetString(SR.ADP_ConnectionAlreadyOpen, ADP.ConnectionStateMsg(state)));
330return InvalidOperation(SR.GetString(SR.ADP_OpenConnectionPropertySet, property, ADP.ConnectionStateMsg(state)));
429return CollectionIndexString(parameterType, ADP.ParameterName, parameterName, collection.GetType());
482return ADP.Argument(SR.GetString(SR.MDF_InvalidRestrictionValue, collectionName, restrictionName, restrictionValue));
Common\System\Data\ProviderBase\DbBuffer.cs (26)
61Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
70IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
89Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
98IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
147Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
157IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
180Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
190IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
239Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
249IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
291Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
301IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
343Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
388Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
396IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
436Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
446IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
462Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
472IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
517Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
527IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
567Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
577IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
758throw ADP.NumericToDecimalOverflow();
789throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer);
src\libraries\Common\src\System\Data\Common\MultipartIdentifier.cs (10)
54throw ADP.InvalidMultipartNameToManyParts(property, name, limit);
68throw ADP.InvalidMultipartNameToManyParts(property, name, limit);
73throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name);
116throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name);
138throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name);
143throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name);
222throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name);
243throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name);
266throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name);
273throw ADP.InvalidMultipartName(property, name); // Name is entirely made up of whitespace
System\Data\Odbc\Odbc32.cs (23)
15return ADP.InvalidOperation(SR.GetString(SR.Odbc_ConnectionClosed));
20return ADP.InvalidOperation(SR.GetString(SR.Odbc_OpenConnectionNoOwner));
25return ADP.Argument(SR.GetString(SR.Odbc_UnknownSQLType, sqltype.ToString()));
30return ADP.Argument(SR.GetString(SR.ODBC_GetSchemaRestrictionRequired));
35return ADP.ArgumentOutOfRange(SR.GetString(SR.ODBC_NotSupportedEnumerationValue, type.Name, value.ToString(System.Globalization.CultureInfo.InvariantCulture)), type.Name);
81return ADP.DataAdapter(SR.GetString(SR.Odbc_NoMappingForSqlTransactionLevel, value.ToString(CultureInfo.InvariantCulture)));
86return ADP.Argument(SR.GetString(SR.Odbc_NegativeArgument));
90return ADP.InvalidOperation(SR.GetString(SR.Odbc_CantSetPropertyOnOpenConnection));
94return ADP.DataAdapter(SR.GetString(SR.Odbc_CantEnableConnectionpooling, ODBC32.RetcodeToString(retcode)));
98return ADP.DataAdapter(SR.GetString(SR.Odbc_CantAllocateEnvironmentHandle, ODBC32.RetcodeToString(retcode)));
102return ADP.DataAdapter(SR.GetString(SR.Odbc_FailedToGetDescriptorHandle, ODBC32.RetcodeToString(retcode)));
106return ADP.InvalidOperation(SR.GetString(SR.Odbc_NotInTransaction));
110return ADP.InvalidEnumerationValue(typeof(OdbcType), (int)odbctype);
121return checked((short)ADP.StringLength(inputString));
275internal static readonly IntPtr SQL_AUTOCOMMIT_OFF = ADP.PtrZero;
580internal static readonly IntPtr SQL_HANDLE_NULL = ADP.PtrZero;
773private static readonly TypeMap s_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);
780private static readonly TypeMap s_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);
882default: throw ADP.DbTypeNotSupported(dbType, typeof(OdbcType));
890case TypeCode.Empty: throw ADP.InvalidDataType(TypeCode.Empty);
908throw ADP.UnknownDataType(dataType);
910case TypeCode.DBNull: throw ADP.InvalidDataType(TypeCode.DBNull);
931default: throw ADP.UnknownDataTypeCode(dataType, Type.GetTypeCode(dataType));
System\Data\Odbc\OdbcConnectionHandle.cs (6)
27throw ADP.ArgumentNull(nameof(connection));
31throw ADP.ArgumentNull(nameof(constr));
110throw ADP.InvalidIsolationLevel(isolevel);
196retcode = Interop.Odbc.SQLDriverConnectW(this, ADP.PtrZero, connectionString, ODBC32.SQL_NTS, ADP.PtrZero, 0, out _, (short)ODBC32.SQL_DRIVER.NOPROMPT);
246ODBC32.SQLRETURN retcode = Interop.Odbc.SQLGetInfoW(this, info, buffer, checked((short)buffer.Length), ADP.PtrZero);
System\Data\Odbc\OdbcParameterCollectionHelper.cs (15)
84throw ADP.ArgumentNull(nameof(values));
102throw ADP.ParametersSourceIndex(parameterName, this, s_itemType);
148throw ADP.ParametersSourceIndex(parameterName, this, s_itemType);
171if (0 == ADP.DstCompare(parameterName, parameter.ParameterName))
222throw ADP.ParametersMappingIndex(index, this);
237throw ADP.CollectionRemoveInvalidObject(s_itemType, this);
288throw ADP.ParametersSourceIndex(parameterName, this, s_itemType);
297throw ADP.ParameterNull(nameof(value), this, s_itemType);
305throw ADP.ParametersIsNotParent(s_itemType, this);
309throw ADP.ParametersIsParent(s_itemType, this);
324if (lastParameter.ParameterName.StartsWith(ADP.Parameter, StringComparison.Ordinal)
325&& int.TryParse(lastParameter.ParameterName.AsSpan(ADP.Parameter.Length), out int lastIndex))
333name = ADP.Parameter + index.ToString(CultureInfo.CurrentCulture);
344throw ADP.ParameterNull(nameof(value), this, s_itemType);
348throw ADP.InvalidParameterType(this, s_itemType, value);