115 references to OleDbType
System.Data (1)
src\runtime\src\libraries\shims\System.Data\ref\System.Data.cs (1)
177
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.OleDb.
OleDbType
))]
System.Data.OleDb (114)
OleDb_Enum.cs (81)
130
private static readonly NativeDBType D_Binary = new NativeDBType(0xff, -1, true, false,
OleDbType
.Binary, NativeDBType.BYTES, S_BINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 0
131
private static readonly NativeDBType D_Boolean = new NativeDBType(0xff, 2, true, false,
OleDbType
.Boolean, NativeDBType.BOOL, S_BOOL, typeof(bool), NativeDBType.BOOL, DbType.Boolean); // 1 - integer2 (variant_bool)
132
private static readonly NativeDBType D_BSTR = new NativeDBType(0xff, IntPtr.Size, false, false,
OleDbType
.BSTR, NativeDBType.BSTR, S_BSTR, typeof(string), NativeDBType.BSTR, DbType.String); // 2 - integer4 (pointer)
133
private static readonly NativeDBType D_Char = new NativeDBType(0xff, -1, true, false,
OleDbType
.Char, NativeDBType.STR, S_CHAR, typeof(string), NativeDBType.WSTR/*STR*/, DbType.AnsiStringFixedLength); // 3 - (ansi pointer)
134
private static readonly NativeDBType D_Currency = new NativeDBType(19, 8, true, false,
OleDbType
.Currency, NativeDBType.CY, S_CY, typeof(decimal), NativeDBType.CY, DbType.Currency); // 4 - integer8
135
private static readonly NativeDBType D_Date = new NativeDBType(0xff, 8, true, false,
OleDbType
.Date, NativeDBType.DATE, S_DATE, typeof(System.DateTime), NativeDBType.DATE, DbType.DateTime); // 5 - double
136
private static readonly NativeDBType D_DBDate = new NativeDBType(0xff, 6, true, false,
OleDbType
.DBDate, NativeDBType.DBDATE, S_DBDATE, typeof(System.DateTime), NativeDBType.DBDATE, DbType.Date); // 6 - (tagDBDate)
137
private static readonly NativeDBType D_DBTime = new NativeDBType(0xff, 6, true, false,
OleDbType
.DBTime, NativeDBType.DBTIME, S_DBTIME, typeof(System.TimeSpan), NativeDBType.DBTIME, DbType.Time); // 7 - (tagDBTime)
138
private static readonly NativeDBType D_DBTimeStamp = new NativeDBType(0xff, 16, true, false,
OleDbType
.DBTimeStamp, NativeDBType.DBTIMESTAMP, S_DBTIMESTAMP, typeof(System.DateTime), NativeDBType.DBTIMESTAMP, DbType.DateTime); // 8 - (tagDBTIMESTAMP)
139
private static readonly NativeDBType D_Decimal = new NativeDBType(28, 16, true, false,
OleDbType
.Decimal, NativeDBType.DECIMAL, S_DECIMAL, typeof(decimal), NativeDBType.DECIMAL, DbType.Decimal); // 9 - (tagDec)
140
private static readonly NativeDBType D_Error = new NativeDBType(0xff, 4, true, false,
OleDbType
.Error, NativeDBType.ERROR, S_ERROR, typeof(int), NativeDBType.ERROR, DbType.Int32); // 10 - integer4
141
private static readonly NativeDBType D_Filetime = new NativeDBType(0xff, 8, true, false,
OleDbType
.Filetime, NativeDBType.FILETIME, S_FILETIME, typeof(System.DateTime), NativeDBType.FILETIME, DbType.DateTime); // 11 - integer8
142
private static readonly NativeDBType D_Guid = new NativeDBType(0xff, 16, true, false,
OleDbType
.Guid, NativeDBType.GUID, S_GUID, typeof(System.Guid), NativeDBType.GUID, DbType.Guid); // 12 - ubyte[16]
143
private static readonly NativeDBType D_TinyInt = new NativeDBType(3, 1, true, false,
OleDbType
.TinyInt, NativeDBType.I1, S_I1, typeof(short), NativeDBType.I1, DbType.SByte); // 13 - integer1
144
private static readonly NativeDBType D_SmallInt = new NativeDBType(5, 2, true, false,
OleDbType
.SmallInt, NativeDBType.I2, S_I2, typeof(short), NativeDBType.I2, DbType.Int16); // 14 - integer2
145
private static readonly NativeDBType D_Integer = new NativeDBType(10, 4, true, false,
OleDbType
.Integer, NativeDBType.I4, S_I4, typeof(int), NativeDBType.I4, DbType.Int32); // 15 - integer4
146
private static readonly NativeDBType D_BigInt = new NativeDBType(19, 8, true, false,
OleDbType
.BigInt, NativeDBType.I8, S_I8, typeof(long), NativeDBType.I8, DbType.Int64); // 16 - integer8
147
private static readonly NativeDBType D_IDispatch = new NativeDBType(0xff, IntPtr.Size, true, false,
OleDbType
.IDispatch, NativeDBType.IDISPATCH, S_IDISPATCH, typeof(object), NativeDBType.IDISPATCH, DbType.Object); // 17 - integer4 (pointer)
148
private static readonly NativeDBType D_IUnknown = new NativeDBType(0xff, IntPtr.Size, true, false,
OleDbType
.IUnknown, NativeDBType.IUNKNOWN, S_IUNKNOWN, typeof(object), NativeDBType.IUNKNOWN, DbType.Object); // 18 - integer4 (pointer)
149
private static readonly NativeDBType D_LongVarBinary = new NativeDBType(0xff, -1, false, true,
OleDbType
.LongVarBinary, NativeDBType.BYTES, S_LONGVARBINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 19
150
private static readonly NativeDBType D_LongVarChar = new NativeDBType(0xff, -1, false, true,
OleDbType
.LongVarChar, NativeDBType.STR, S_LONGVARCHAR, typeof(string), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 20 - (ansi pointer)
151
private static readonly NativeDBType D_Numeric = new NativeDBType(28, 19, true, false,
OleDbType
.Numeric, NativeDBType.NUMERIC, S_NUMERIC, typeof(decimal), NativeDBType.NUMERIC, DbType.Decimal); // 21 - (tagDB_Numeric)
152
private static readonly unsafe NativeDBType D_PropVariant = new NativeDBType(0xff, sizeof(ComVariant), true, false,
OleDbType
.PropVariant, NativeDBType.PROPVARIANT, S_PROPVARIANT, typeof(object), NativeDBType.VARIANT, DbType.Object); // 22
153
private static readonly NativeDBType D_Single = new NativeDBType(7, 4, true, false,
OleDbType
.Single, NativeDBType.R4, S_R4, typeof(float), NativeDBType.R4, DbType.Single); // 23 - single
154
private static readonly NativeDBType D_Double = new NativeDBType(15, 8, true, false,
OleDbType
.Double, NativeDBType.R8, S_R8, typeof(double), NativeDBType.R8, DbType.Double); // 24 - double
155
private static readonly NativeDBType D_UnsignedTinyInt = new NativeDBType(3, 1, true, false,
OleDbType
.UnsignedTinyInt, NativeDBType.UI1, S_UI1, typeof(byte), NativeDBType.UI1, DbType.Byte); // 25 - byte7
156
private static readonly NativeDBType D_UnsignedSmallInt = new NativeDBType(5, 2, true, false,
OleDbType
.UnsignedSmallInt, NativeDBType.UI2, S_UI2, typeof(int), NativeDBType.UI2, DbType.UInt16); // 26 - unsigned integer2
157
private static readonly NativeDBType D_UnsignedInt = new NativeDBType(10, 4, true, false,
OleDbType
.UnsignedInt, NativeDBType.UI4, S_UI4, typeof(long), NativeDBType.UI4, DbType.UInt32); // 27 - unsigned integer4
158
private static readonly NativeDBType D_UnsignedBigInt = new NativeDBType(20, 8, true, false,
OleDbType
.UnsignedBigInt, NativeDBType.UI8, S_UI8, typeof(decimal), NativeDBType.UI8, DbType.UInt64); // 28 - unsigned integer8
159
private static readonly NativeDBType D_VarBinary = new NativeDBType(0xff, -1, false, false,
OleDbType
.VarBinary, NativeDBType.BYTES, S_VARBINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 29
160
private static readonly NativeDBType D_VarChar = new NativeDBType(0xff, -1, false, false,
OleDbType
.VarChar, NativeDBType.STR, S_VARCHAR, typeof(string), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 30 - (ansi pointer)
161
private static readonly NativeDBType D_Variant = new NativeDBType(0xff, ODB.SizeOf_Variant, true, false,
OleDbType
.Variant, NativeDBType.VARIANT, S_VARIANT, typeof(object), NativeDBType.VARIANT, DbType.Object); // 31 - ubyte[16] (variant)
162
private static readonly NativeDBType D_VarNumeric = new NativeDBType(255, 16, true, false,
OleDbType
.VarNumeric, NativeDBType.VARNUMERIC, S_VARNUMERIC, typeof(decimal), NativeDBType.DECIMAL, DbType.VarNumeric); // 32 - (unicode pointer)
163
private static readonly NativeDBType D_WChar = new NativeDBType(0xff, -1, true, false,
OleDbType
.WChar, NativeDBType.WSTR, S_WCHAR, typeof(string), NativeDBType.WSTR, DbType.StringFixedLength); // 33 - (unicode pointer)
164
private static readonly NativeDBType D_VarWChar = new NativeDBType(0xff, -1, false, false,
OleDbType
.VarWChar, NativeDBType.WSTR, S_WVARCHAR, typeof(string), NativeDBType.WSTR, DbType.String); // 34 - (unicode pointer)
165
private static readonly NativeDBType D_LongVarWChar = new NativeDBType(0xff, -1, false, true,
OleDbType
.LongVarWChar, NativeDBType.WSTR, S_WLONGVARCHAR, typeof(string), NativeDBType.WSTR, DbType.String); // 35 - (unicode pointer)
166
private static readonly NativeDBType D_Chapter = new NativeDBType(0xff, IntPtr.Size, false, false,
OleDbType
.Empty, NativeDBType.HCHAPTER, S_UDT, typeof(IDataReader), NativeDBType.HCHAPTER, DbType.Object); // 36 - (hierarchical chaper)
167
private static readonly NativeDBType D_Empty = new NativeDBType(0xff, 0, false, false,
OleDbType
.Empty, NativeDBType.EMPTY, "", null, NativeDBType.EMPTY, DbType.Object); // 37 - invalid param default
168
private static readonly NativeDBType D_Xml = new NativeDBType(0xff, -1, false, false,
OleDbType
.VarWChar, NativeDBType.XML, S_XML, typeof(string), NativeDBType.WSTR, DbType.String); // 38 - (unicode pointer)
169
private static readonly NativeDBType D_Udt = new NativeDBType(0xff, -1, false, false,
OleDbType
.VarBinary, NativeDBType.UDT, S_BINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 39 - (unicode pointer)
177
internal readonly
OleDbType
enumOleDbType; // enum System.Data.OleDb.OleDbType
192
private NativeDBType(byte maxpre, int fixlen, bool isfixed, bool islong,
OleDbType
enumOleDbType, short dbType, string dbstring, Type? dataType, short wType, DbType enumDbType)
223
internal static NativeDBType FromDataType(
OleDbType
enumOleDbType) =>
226
OleDbType
.Empty => D_Empty, // 0
227
OleDbType
.SmallInt => D_SmallInt, // 2
228
OleDbType
.Integer => D_Integer, // 3
229
OleDbType
.Single => D_Single, // 4
230
OleDbType
.Double => D_Double, // 5
231
OleDbType
.Currency => D_Currency, // 6
232
OleDbType
.Date => D_Date, // 7
233
OleDbType
.BSTR => D_BSTR, // 8
234
OleDbType
.IDispatch => D_IDispatch, // 9
235
OleDbType
.Error => D_Error, // 10
236
OleDbType
.Boolean => D_Boolean, // 11
237
OleDbType
.Variant => D_Variant, // 12
238
OleDbType
.IUnknown => D_IUnknown, // 13
239
OleDbType
.Decimal => D_Decimal, // 14
240
OleDbType
.TinyInt => D_TinyInt, // 16
241
OleDbType
.UnsignedTinyInt => D_UnsignedTinyInt, // 17
242
OleDbType
.UnsignedSmallInt => D_UnsignedSmallInt, // 18
243
OleDbType
.UnsignedInt => D_UnsignedInt, // 19
244
OleDbType
.BigInt => D_BigInt, // 20
245
OleDbType
.UnsignedBigInt => D_UnsignedBigInt, // 21
246
OleDbType
.Filetime => D_Filetime, // 64
247
OleDbType
.Guid => D_Guid, // 72
248
OleDbType
.Binary => D_Binary, // 128
249
OleDbType
.Char => D_Char, // 129
250
OleDbType
.WChar => D_WChar, // 130
251
OleDbType
.Numeric => D_Numeric, // 131
252
OleDbType
.DBDate => D_DBDate, // 133
253
OleDbType
.DBTime => D_DBTime, // 134
254
OleDbType
.DBTimeStamp => D_DBTimeStamp, // 135
255
OleDbType
.PropVariant => D_PropVariant, // 138
256
OleDbType
.VarNumeric => D_VarNumeric, // 139
257
OleDbType
.VarChar => D_VarChar, // 200
258
OleDbType
.LongVarChar => D_LongVarChar, // 201
259
OleDbType
.VarWChar => D_VarWChar, // 202: ORA-12704: character set mismatch
260
OleDbType
.LongVarWChar => D_LongVarWChar, // 203
261
OleDbType
.VarBinary => D_VarBinary, // 204
262
OleDbType
.LongVarBinary => D_LongVarBinary, // 205
341
_ => throw ADP.DbTypeNotSupported(dbType, typeof(
OleDbType
)),
OleDb_Util.cs (3)
89
internal static Exception UninitializedParameters(int index,
OleDbType
dbtype)
248
internal static Exception InvalidOleDbType(
OleDbType
value)
250
return ADP.InvalidEnumerationValue(typeof(
OleDbType
), (int)value);
OleDbCommandBuilder.cs (13)
88
p.OleDbType = (
OleDbType
)valueType;
259
case
OleDbType
.Decimal:
260
case
OleDbType
.Numeric:
261
case
OleDbType
.VarNumeric:
273
case
OleDbType
.VarBinary:
274
case
OleDbType
.VarChar:
275
case
OleDbType
.VarWChar:
283
parameter.OleDbType =
OleDbType
.Binary;
289
parameter.OleDbType =
OleDbType
.LongVarBinary;
292
parameter.OleDbType =
OleDbType
.Char;
299
parameter.OleDbType =
OleDbType
.LongVarChar;
302
parameter.OleDbType =
OleDbType
.WChar;
307
parameter.OleDbType =
OleDbType
.LongVarWChar;
OleDbDataReader.cs (1)
393
newRow[size] = ((info.type.enumOleDbType !=
OleDbType
.BSTR) ? info.size : -1);
OleDbParameter.cs (13)
31
Debug.Assert(!(value is
OleDbType
), "use OleDbParameter(string, OleDbType)");
38
public OleDbParameter(string? name,
OleDbType
dataType) : this()
44
public OleDbParameter(string? name,
OleDbType
dataType, int size) : this()
51
public OleDbParameter(string? name,
OleDbType
dataType, int size, string? srcColumn) : this()
61
OleDbType
dbType, int size,
81
OleDbType
dbType, int size,
133
public
OleDbType
OleDbType
296
if (
OleDbType
.Empty == dbtype.enumOleDbType)
689
ctorParams = new Type[] { typeof(string), typeof(
OleDbType
) };
694
ctorParams = new Type[] { typeof(string), typeof(
OleDbType
), typeof(int) };
701
ctorParams = new Type[] { typeof(string), typeof(
OleDbType
), typeof(int), typeof(string) };
712
typeof(string), typeof(
OleDbType
), typeof(int), typeof(ParameterDirection),
723
typeof(string), typeof(
OleDbType
), typeof(int), typeof(ParameterDirection),
OleDbParameterCollection.cs (3)
79
public OleDbParameter Add(string? parameterName,
OleDbType
oleDbType)
84
public OleDbParameter Add(string? parameterName,
OleDbType
oleDbType, int size)
89
public OleDbParameter Add(string? parameterName,
OleDbType
oleDbType, int size, string? sourceColumn)