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