40 instantiations of NativeDBType
System.Data.OleDb (40)
OleDb_Enum.cs (40)
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)
443 references to NativeDBType
System.Data.OleDb (443)
ColumnBinding.cs (203)
126
get { return
NativeDBType
.FromDBType(DbType, false, false).dataType!; }
173
|| (((
NativeDBType
.VARIANT == DbType) || (
NativeDBType
.PROPVARIANT == DbType))
282
case
NativeDBType
.EMPTY:
283
case
NativeDBType
.NULL:
286
case
NativeDBType
.I2:
289
case
NativeDBType
.I4:
292
case
NativeDBType
.R4:
295
case
NativeDBType
.R8:
298
case
NativeDBType
.CY:
301
case
NativeDBType
.DATE:
304
case
NativeDBType
.BSTR:
307
case
NativeDBType
.IDISPATCH:
310
case
NativeDBType
.ERROR:
313
case
NativeDBType
.BOOL:
316
case
NativeDBType
.VARIANT:
319
case
NativeDBType
.IUNKNOWN:
322
case
NativeDBType
.DECIMAL:
325
case
NativeDBType
.I1:
328
case
NativeDBType
.UI1:
331
case
NativeDBType
.UI2:
334
case
NativeDBType
.UI4:
337
case
NativeDBType
.I8:
340
case
NativeDBType
.UI8:
343
case
NativeDBType
.FILETIME:
346
case
NativeDBType
.GUID:
349
case
NativeDBType
.BYTES:
352
case
NativeDBType
.WSTR:
355
case
NativeDBType
.NUMERIC:
358
case
NativeDBType
.DBDATE:
361
case
NativeDBType
.DBTIME:
364
case
NativeDBType
.DBTIMESTAMP:
367
case
NativeDBType
.PROPVARIANT:
370
case
NativeDBType
.HCHAPTER:
373
case (
NativeDBType
.BYREF |
NativeDBType
.BYTES):
376
case (
NativeDBType
.BYREF |
NativeDBType
.WSTR):
382
case
NativeDBType
.STR:
385
case
NativeDBType
.VARNUMERIC:
388
case
NativeDBType
.UDT:
391
case (
NativeDBType
.BYREF |
NativeDBType
.STR):
400
case
NativeDBType
.BYTES:
403
case
NativeDBType
.WSTR:
406
case (
NativeDBType
.BYREF |
NativeDBType
.BYTES):
409
case (
NativeDBType
.BYREF |
NativeDBType
.WSTR):
415
case
NativeDBType
.STR:
418
case (
NativeDBType
.BYREF |
NativeDBType
.STR):
448
case
NativeDBType
.EMPTY:
451
case
NativeDBType
.NULL: // language null - no representation, use DBNull
454
case
NativeDBType
.I2:
457
case
NativeDBType
.I4:
460
case
NativeDBType
.R4:
463
case
NativeDBType
.R8:
466
case
NativeDBType
.CY:
469
case
NativeDBType
.DATE:
472
case
NativeDBType
.BSTR:
475
case
NativeDBType
.IDISPATCH:
478
case
NativeDBType
.ERROR:
481
case
NativeDBType
.BOOL:
484
case
NativeDBType
.VARIANT:
487
case
NativeDBType
.IUNKNOWN:
490
case
NativeDBType
.DECIMAL:
493
case
NativeDBType
.I1:
503
case
NativeDBType
.UI1:
506
case
NativeDBType
.UI2:
516
case
NativeDBType
.UI4:
526
case
NativeDBType
.I8:
529
case
NativeDBType
.UI8:
539
case
NativeDBType
.FILETIME:
542
case
NativeDBType
.GUID:
545
case
NativeDBType
.BYTES:
548
case
NativeDBType
.WSTR:
558
case
NativeDBType
.NUMERIC:
561
case
NativeDBType
.DBDATE:
564
case
NativeDBType
.DBTIME:
567
case
NativeDBType
.DBTIMESTAMP:
570
case
NativeDBType
.PROPVARIANT:
573
case (
NativeDBType
.BYREF |
NativeDBType
.BYTES):
576
case (
NativeDBType
.BYREF |
NativeDBType
.WSTR):
590
case
NativeDBType
.STR:
593
case
NativeDBType
.UDT:
596
case
NativeDBType
.HCHAPTER:
599
case
NativeDBType
.VARNUMERIC:
602
case (
NativeDBType
.BYREF |
NativeDBType
.STR):
611
Debug.Assert((
NativeDBType
.BOOL == DbType), "Value_BOOL");
618
Debug.Assert((
NativeDBType
.BOOL == DbType), "Value_BOOL");
626
Debug.Assert((
NativeDBType
.BSTR == DbType), "Value_BSTR");
653
Debug.Assert((
NativeDBType
.BSTR == DbType), "Value_BSTR");
661
Debug.Assert(((
NativeDBType
.BYREF |
NativeDBType
.BYTES) == DbType), "Value_ByRefBYTES");
689
Debug.Assert((
NativeDBType
.BYREF |
NativeDBType
.BYTES) == DbType, "Value_ByRefBYTES");
709
Debug.Assert((
NativeDBType
.BYREF |
NativeDBType
.WSTR) == DbType, "Value_ByRefWSTR");
737
Debug.Assert((
NativeDBType
.BYREF |
NativeDBType
.WSTR) == DbType, "Value_ByRefWSTR");
756
Debug.Assert((
NativeDBType
.BYREF |
NativeDBType
.WSTR) == DbType, "Value_ByRefWSTR");
775
Debug.Assert(
NativeDBType
.BYTES == DbType, "Value_BYTES");
797
Debug.Assert(
NativeDBType
.CY == DbType, "Value_CY");
803
Debug.Assert(
NativeDBType
.CY == DbType, "Value_CY");
811
Debug.Assert(
NativeDBType
.DATE == DbType, "Value_DATE");
817
Debug.Assert(
NativeDBType
.DATE == DbType, "Value_DATE");
825
Debug.Assert(
NativeDBType
.DBDATE == DbType, "Value_DBDATE");
831
Debug.Assert(
NativeDBType
.DBDATE == DbType, "Value_DATE");
839
Debug.Assert(
NativeDBType
.DBTIME == DbType, "Value_DBTIME");
845
Debug.Assert(
NativeDBType
.DBTIME == DbType, "Value_DBTIME");
853
Debug.Assert(
NativeDBType
.DBTIMESTAMP == DbType, "Value_DBTIMESTAMP");
859
Debug.Assert(
NativeDBType
.DBTIMESTAMP == DbType, "Value_DBTIMESTAMP");
867
Debug.Assert(
NativeDBType
.DECIMAL == DbType, "Value_DECIMAL");
880
Debug.Assert(
NativeDBType
.DECIMAL == DbType, "Value_DECIMAL");
900
Debug.Assert(
NativeDBType
.ERROR == DbType, "Value_ERROR");
906
Debug.Assert(
NativeDBType
.ERROR == DbType, "Value_ERROR");
914
Debug.Assert(
NativeDBType
.FILETIME == DbType, "Value_FILETIME");
921
Debug.Assert(
NativeDBType
.FILETIME == DbType, "Value_FILETIME");
930
Debug.Assert(
NativeDBType
.GUID == DbType, "Value_GUID");
936
Debug.Assert(
NativeDBType
.GUID == DbType, "Value_GUID");
945
Debug.Assert(
NativeDBType
.HCHAPTER == DbType, "Value_HCHAPTER");
953
Debug.Assert(
NativeDBType
.I1 == DbType, "Value_I1");
960
Debug.Assert(
NativeDBType
.I1 == DbType, "Value_I1");
968
Debug.Assert(
NativeDBType
.I2 == DbType, "Value_I2");
974
Debug.Assert(
NativeDBType
.I2 == DbType, "Value_I2");
982
Debug.Assert(
NativeDBType
.I4 == DbType, "Value_I4");
988
Debug.Assert(
NativeDBType
.I4 == DbType, "Value_I4");
996
Debug.Assert(
NativeDBType
.I8 == DbType, "Value_I8");
1002
Debug.Assert(
NativeDBType
.I8 == DbType, "Value_I8");
1010
Debug.Assert(
NativeDBType
.IDISPATCH == DbType, "Value_IDISPATCH");
1034
Debug.Assert(
NativeDBType
.IDISPATCH == DbType, "Value_IDISPATCH");
1057
Debug.Assert(
NativeDBType
.IUNKNOWN == DbType, "Value_IUNKNOWN");
1081
Debug.Assert(
NativeDBType
.IUNKNOWN == DbType, "Value_IUNKNOWN");
1090
Debug.Assert(
NativeDBType
.NUMERIC == DbType, "Value_NUMERIC");
1096
Debug.Assert(
NativeDBType
.NUMERIC == DbType, "Value_NUMERIC");
1111
Debug.Assert(
NativeDBType
.R4 == DbType, "Value_R4");
1118
Debug.Assert(
NativeDBType
.R4 == DbType, "Value_R4");
1126
Debug.Assert(
NativeDBType
.R8 == DbType, "Value_R8");
1133
Debug.Assert(
NativeDBType
.R8 == DbType, "Value_I4");
1141
Debug.Assert(
NativeDBType
.UI1 == DbType, "Value_UI1");
1147
Debug.Assert(
NativeDBType
.UI1 == DbType, "Value_UI1");
1155
Debug.Assert(
NativeDBType
.UI2 == DbType, "Value_UI2");
1161
Debug.Assert(
NativeDBType
.UI2 == DbType, "Value_UI2");
1169
Debug.Assert(
NativeDBType
.UI4 == DbType, "Value_UI4");
1175
Debug.Assert(
NativeDBType
.UI4 == DbType, "Value_UI4");
1183
Debug.Assert(
NativeDBType
.UI8 == DbType, "Value_UI8");
1189
Debug.Assert(
NativeDBType
.UI8 == DbType, "Value_UI8");
1197
Debug.Assert(
NativeDBType
.WSTR == DbType, "Value_WSTR");
1206
Debug.Assert(
NativeDBType
.WSTR == DbType, "Value_WSTR");
1221
Debug.Assert(
NativeDBType
.WSTR == DbType, "Value_WSTR");
1234
Debug.Assert((
NativeDBType
.VARIANT == DbType) || (
NativeDBType
.PROPVARIANT == DbType), "Value_VARIANT");
1240
Debug.Assert((
NativeDBType
.VARIANT == DbType) || (
NativeDBType
.PROPVARIANT == DbType), "Value_VARIANT");
1254
case
NativeDBType
.BOOL:
1257
case
NativeDBType
.VARIANT:
1280
case
NativeDBType
.BYTES:
1283
case
NativeDBType
.VARIANT:
1286
case (
NativeDBType
.BYREF |
NativeDBType
.BYTES):
1296
case
NativeDBType
.BYTES:
1299
case (
NativeDBType
.BYREF |
NativeDBType
.BYTES):
1322
case
NativeDBType
.UI1:
1325
case
NativeDBType
.VARIANT:
1348
case
NativeDBType
.HCHAPTER:
1371
case
NativeDBType
.DATE:
1374
case
NativeDBType
.DBDATE:
1377
case
NativeDBType
.DBTIMESTAMP:
1380
case
NativeDBType
.FILETIME:
1383
case
NativeDBType
.VARIANT:
1404
case
NativeDBType
.CY:
1407
case
NativeDBType
.DECIMAL:
1410
case
NativeDBType
.NUMERIC:
1413
case
NativeDBType
.UI8:
1416
case
NativeDBType
.VARIANT:
1437
case
NativeDBType
.GUID:
1458
case
NativeDBType
.I2:
1461
case
NativeDBType
.I1:
1464
case
NativeDBType
.VARIANT:
1493
case
NativeDBType
.I4:
1496
case
NativeDBType
.UI2:
1499
case
NativeDBType
.VARIANT:
1528
case
NativeDBType
.I8:
1531
case
NativeDBType
.UI4:
1534
case
NativeDBType
.VARIANT:
1563
case
NativeDBType
.R4:
1566
case
NativeDBType
.VARIANT:
1587
case
NativeDBType
.R8:
1590
case
NativeDBType
.VARIANT:
1613
case
NativeDBType
.BSTR:
1616
case
NativeDBType
.VARIANT:
1619
case
NativeDBType
.WSTR:
1622
case (
NativeDBType
.BYREF |
NativeDBType
.WSTR):
1632
case
NativeDBType
.WSTR:
1635
case (
NativeDBType
.BYREF |
NativeDBType
.WSTR):
DbBindings.cs (8)
189
case (
NativeDBType
.BSTR): // ADP.PtrSize
190
case (
NativeDBType
.HCHAPTER): // ADP.PtrSize
191
case (
NativeDBType
.PROPVARIANT): // sizeof(ComVariant)
192
case (
NativeDBType
.VARIANT): // sizeof(ComVariant)
193
case (
NativeDBType
.BYREF |
NativeDBType
.BYTES): // ADP.PtrSize
194
case (
NativeDBType
.BYREF |
NativeDBType
.WSTR): // ADP.PtrSize
OleDb_Enum.cs (147)
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)
171
internal static readonly
NativeDBType
Default = D_VarWChar;
223
internal static
NativeDBType
FromDataType(OleDbType enumOleDbType) =>
266
internal static
NativeDBType
FromSystemType(object value)
273
TypeCode.Empty =>
NativeDBType
.D_Empty,
274
TypeCode.Object =>
NativeDBType
.D_Variant,
276
TypeCode.Boolean =>
NativeDBType
.D_Boolean,
277
TypeCode.Char =>
NativeDBType
.D_Char,
278
TypeCode.SByte =>
NativeDBType
.D_TinyInt,
279
TypeCode.Byte =>
NativeDBType
.D_UnsignedTinyInt,
280
TypeCode.Int16 =>
NativeDBType
.D_SmallInt,
281
TypeCode.UInt16 =>
NativeDBType
.D_UnsignedSmallInt,
282
TypeCode.Int32 =>
NativeDBType
.D_Integer,
283
TypeCode.UInt32 =>
NativeDBType
.D_UnsignedInt,
284
TypeCode.Int64 =>
NativeDBType
.D_BigInt,
285
TypeCode.UInt64 =>
NativeDBType
.D_UnsignedBigInt,
286
TypeCode.Single =>
NativeDBType
.D_Single,
287
TypeCode.Double =>
NativeDBType
.D_Double,
288
TypeCode.Decimal =>
NativeDBType
.D_Decimal,
289
TypeCode.DateTime =>
NativeDBType
.D_DBTimeStamp,
290
TypeCode.String =>
NativeDBType
.D_VarWChar,
296
return
NativeDBType
.D_VarBinary;
300
return
NativeDBType
.D_Guid;
304
return
NativeDBType
.D_DBTime;
308
return
NativeDBType
.D_Variant;
313
internal static
NativeDBType
FromDbType(DbType dbType) =>
344
internal static
NativeDBType
FromDBType(short dbType, bool isLong, bool isFixed)
422
if (0 != (
NativeDBType
.VECTOR & dbType))
OleDbCommandBuilder.cs (1)
251
parameter.OleDbType =
NativeDBType
.FromDBType(wType, false, false).enumOleDbType;
OleDbDataReader.cs (11)
523
if (filterChapters && (
NativeDBType
.HCHAPTER == dbColumnInfo.wType))
530
NativeDBType
dbType =
NativeDBType
.FromDBType(dbColumnInfo.wType, islong, isfixed);
1600
Debug.Assert(
NativeDBType
.STR != getType, "Should have bound as WSTR");
1607
getType = (short)((ushort)getType | (ushort)
NativeDBType
.BYREF);
1624
getType = (short)((ushort)getType | (ushort)
NativeDBType
.BYREF);
1626
else if ((
NativeDBType
.WSTR == getType) && (-1 != info.size))
1644
getType = (short)((ushort)getType | (ushort)
NativeDBType
.BYREF);
2344
NativeDBType
dbType =
NativeDBType
.FromDBType(wType, islong, isfixed);
2553
internal
NativeDBType
type = null!; // Late-initialized
OleDbMetaDataFactory.cs (2)
424
NativeDBType
nativeType =
NativeDBType
.FromDBType(nativeDataType, (bool)newRow[isLong], (bool)newRow[isFixed]);
OleDbParameter.cs (28)
15
private
NativeDBType
? _metaType;
23
private
NativeDBType
? _coerceMetaType;
115
NativeDBType
? dbtype = _metaType;
119
_metaType =
NativeDBType
.FromDbType(value);
141
NativeDBType
? dbtype = _metaType;
145
_metaType =
NativeDBType
.FromDataType(value);
295
NativeDBType
dbtype = GetBindType(value);
342
if (
NativeDBType
.STR == dbtype.dbType)
346
else if (
NativeDBType
.WSTR == dbtype.dbType)
355
wtype |=
NativeDBType
.BYREF;
377
if (
NativeDBType
.WSTR == dbtype.wType)
384
Debug.Assert(
NativeDBType
.STR != dbtype.wType, "should have ANSI binding, describing is okay");
390
if (
NativeDBType
.STR == dbtype.dbType)
400
wtype |=
NativeDBType
.BYREF;
405
if (
NativeDBType
.WSTR == wtype)
412
Debug.Assert(
NativeDBType
.STR != dbtype.wType, "should have ANSI binding, describing is okay");
419
wtype |=
NativeDBType
.BYREF;
464
private static object? CoerceValue(object? value,
NativeDBType
destinationType)
477
else if ((
NativeDBType
.CY == destinationType.dbType) && (typeof(string) == currentType))
501
private
NativeDBType
GetBindType(object? value)
503
NativeDBType
? dbtype = _metaType;
508
dbtype = OleDb.
NativeDBType
.Default;
512
dbtype =
NativeDBType
.FromSystemType(value);
531
NativeDBType
? metaType = _metaType;
534
|| ((
NativeDBType
.DECIMAL == metaType.dbType) || (
NativeDBType
.NUMERIC == metaType.dbType)
554
else if (!ShouldSerializePrecision() && !ShouldSerializeScale() && ((
NativeDBType
.DECIMAL == _metaType.wType) || (
NativeDBType
.NUMERIC == _metaType.wType)))
RowBinding.cs (43)
380
case (
NativeDBType
.BYREF |
NativeDBType
.BYTES):
381
case (
NativeDBType
.BYREF |
NativeDBType
.WSTR):
382
case
NativeDBType
.PROPVARIANT:
383
case
NativeDBType
.VARIANT:
384
case
NativeDBType
.BSTR:
385
case
NativeDBType
.HCHAPTER:
406
case (
NativeDBType
.BYREF |
NativeDBType
.BYTES):
407
case (
NativeDBType
.BYREF |
NativeDBType
.WSTR):
411
case
NativeDBType
.VARIANT:
412
case
NativeDBType
.PROPVARIANT:
416
case
NativeDBType
.BSTR:
420
case
NativeDBType
.HCHAPTER:
429
case
NativeDBType
.EMPTY:
430
case
NativeDBType
.NULL:
431
case
NativeDBType
.I2:
432
case
NativeDBType
.I4:
433
case
NativeDBType
.R4:
434
case
NativeDBType
.R8:
435
case
NativeDBType
.CY:
436
case
NativeDBType
.DATE:
437
case
NativeDBType
.ERROR:
438
case
NativeDBType
.BOOL:
439
case
NativeDBType
.DECIMAL:
440
case
NativeDBType
.I1:
441
case
NativeDBType
.UI1:
442
case
NativeDBType
.UI2:
443
case
NativeDBType
.UI4:
444
case
NativeDBType
.I8:
445
case
NativeDBType
.UI8:
446
case
NativeDBType
.FILETIME:
447
case
NativeDBType
.GUID:
448
case
NativeDBType
.BYTES:
449
case
NativeDBType
.WSTR:
450
case
NativeDBType
.NUMERIC:
451
case
NativeDBType
.DBDATE:
452
case
NativeDBType
.DBTIME:
453
case
NativeDBType
.DBTIMESTAMP:
455
case
NativeDBType
.IDISPATCH:
456
case
NativeDBType
.IUNKNOWN: