39 instantiations of NativeDBType
System.Data (39)
fx\src\data\System\Data\OleDb\OLEDB_Enum.cs (39)
158static private readonly NativeDBType D_Binary = new NativeDBType(0xff, -1, true, false, OleDbType.Binary, NativeDBType.BYTES, S_BINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 0 159static private readonly NativeDBType D_Boolean = new NativeDBType(0xff, 2, true, false, OleDbType.Boolean, NativeDBType.BOOL, S_BOOL, typeof(System.Boolean), NativeDBType.BOOL, DbType.Boolean ); // 1 - integer2 (variant_bool) 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) 161static private readonly NativeDBType D_Char = new NativeDBType(0xff, -1, true, false, OleDbType.Char, NativeDBType.STR, S_CHAR, typeof(System.String), NativeDBType.WSTR/*STR*/, DbType.AnsiStringFixedLength); // 3 - (ansi pointer) 162static private readonly NativeDBType D_Currency = new NativeDBType( 19, 8, true, false, OleDbType.Currency, NativeDBType.CY, S_CY, typeof(System.Decimal), NativeDBType.CY, DbType.Currency ); // 4 - integer8 163static private 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 164static private 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) 165static private 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) 166static private 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) 167static private readonly NativeDBType D_Decimal = new NativeDBType( 28, 16, true, false, OleDbType.Decimal, NativeDBType.DECIMAL, S_DECIMAL, typeof(System.Decimal), NativeDBType.DECIMAL, DbType.Decimal ); // 9 - (tagDec) // MDAC 68447 168static private readonly NativeDBType D_Error = new NativeDBType(0xff, 4, true, false, OleDbType.Error, NativeDBType.ERROR, S_ERROR, typeof(System.Int32), NativeDBType.ERROR, DbType.Int32 ); // 10 - integer4 169static private 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 // MDAC 59504 170static private 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] 171static private readonly NativeDBType D_TinyInt = new NativeDBType( 3, 1, true, false, OleDbType.TinyInt, NativeDBType.I1, S_I1, typeof(System.Int16), NativeDBType.I1, DbType.SByte ); // 13 - integer1 // MDAC 59492 172static private readonly NativeDBType D_SmallInt = new NativeDBType( 5, 2, true, false, OleDbType.SmallInt, NativeDBType.I2, S_I2, typeof(System.Int16), NativeDBType.I2, DbType.Int16 ); // 14 - integer2 173static private readonly NativeDBType D_Integer = new NativeDBType( 10, 4, true, false, OleDbType.Integer, NativeDBType.I4, S_I4, typeof(System.Int32), NativeDBType.I4, DbType.Int32 ); // 15 - integer4 174static private readonly NativeDBType D_BigInt = new NativeDBType( 19, 8, true, false, OleDbType.BigInt, NativeDBType.I8, S_I8, typeof(System.Int64), NativeDBType.I8, DbType.Int64 ); // 16 - integer8 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 177static private readonly NativeDBType D_LongVarBinary = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarBinary, NativeDBType.BYTES, S_LONGVARBINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 19 178static private readonly NativeDBType D_LongVarChar = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarChar, NativeDBType.STR, S_LONGVARCHAR, typeof(System.String), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 20 - (ansi pointer) 179static private readonly NativeDBType D_Numeric = new NativeDBType( 28, 19, true, false, OleDbType.Numeric, NativeDBType.NUMERIC, S_NUMERIC, typeof(System.Decimal), NativeDBType.NUMERIC, DbType.Decimal ); // 21 - (tagDB_Numeric) 182static private readonly NativeDBType D_Single = new NativeDBType( 7, 4, true, false, OleDbType.Single, NativeDBType.R4, S_R4, typeof(System.Single), NativeDBType.R4, DbType.Single ); // 23 - single 183static private readonly NativeDBType D_Double = new NativeDBType( 15, 8, true, false, OleDbType.Double, NativeDBType.R8, S_R8, typeof(System.Double), NativeDBType.R8, DbType.Double ); // 24 - double 184static private readonly NativeDBType D_UnsignedTinyInt = new NativeDBType( 3, 1, true, false, OleDbType.UnsignedTinyInt, NativeDBType.UI1, S_UI1, typeof(System.Byte), NativeDBType.UI1, DbType.Byte ); // 25 - byte7 185static private readonly NativeDBType D_UnsignedSmallInt = new NativeDBType( 5, 2, true, false, OleDbType.UnsignedSmallInt, NativeDBType.UI2, S_UI2, typeof(System.Int32), NativeDBType.UI2, DbType.UInt16 ); // 26 - unsigned integer2 186static private readonly NativeDBType D_UnsignedInt = new NativeDBType( 10, 4, true, false, OleDbType.UnsignedInt, NativeDBType.UI4, S_UI4, typeof(System.Int64), NativeDBType.UI4, DbType.UInt32 ); // 27 - unsigned integer4 187static private readonly NativeDBType D_UnsignedBigInt = new NativeDBType( 20, 8, true, false, OleDbType.UnsignedBigInt, NativeDBType.UI8, S_UI8, typeof(System.Decimal), NativeDBType.UI8, DbType.UInt64 ); // 28 - unsigned integer8 188static private readonly NativeDBType D_VarBinary = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.BYTES, S_VARBINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 29 189static private readonly NativeDBType D_VarChar = new NativeDBType(0xff, -1, false, false, OleDbType.VarChar, NativeDBType.STR, S_VARCHAR, typeof(System.String), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 30 - (ansi pointer) 190static private readonly NativeDBType D_Variant = new NativeDBType(0xff, ODB.SizeOf_Variant, true, false, OleDbType.Variant, NativeDBType.VARIANT, S_VARIANT, typeof(System.Object), NativeDBType.VARIANT, DbType.Object ); // 31 - ubyte[16] (variant) 191static private readonly NativeDBType D_VarNumeric = new NativeDBType( 255, 16, true, false, OleDbType.VarNumeric, NativeDBType.VARNUMERIC, S_VARNUMERIC, typeof(System.Decimal), NativeDBType.DECIMAL, DbType.VarNumeric); // 32 - (unicode pointer) 192static private readonly NativeDBType D_WChar = new NativeDBType(0xff, -1, true, false, OleDbType.WChar, NativeDBType.WSTR, S_WCHAR, typeof(System.String), NativeDBType.WSTR, DbType.StringFixedLength); // 33 - (unicode pointer) 193static private readonly NativeDBType D_VarWChar = new NativeDBType(0xff, -1, false, false, OleDbType.VarWChar, NativeDBType.WSTR, S_WVARCHAR, typeof(System.String), NativeDBType.WSTR, DbType.String ); // 34 - (unicode pointer) 194static private readonly NativeDBType D_LongVarWChar = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarWChar, NativeDBType.WSTR, S_WLONGVARCHAR, typeof(System.String), NativeDBType.WSTR, DbType.String ); // 35 - (unicode pointer) 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) 196static private readonly NativeDBType D_Empty = new NativeDBType(0xff, 0, false, false, OleDbType.Empty, NativeDBType.EMPTY, "", null, NativeDBType.EMPTY, DbType.Object ); // 37 - invalid param default 197static private readonly NativeDBType D_Xml = new NativeDBType(0xff, -1, false, false, OleDbType.VarWChar, NativeDBType.XML, S_XML, typeof(System.String), NativeDBType.WSTR, DbType.String ); // 38 - (unicode pointer) 198static private readonly NativeDBType D_Udt = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.UDT, S_BINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 39 - (unicode pointer)
395 references to NativeDBType
System.Data (395)
fx\src\data\System\Data\OleDb\ColumnBinding.cs (189)
119get { return NativeDBType.FromDBType(DbType, false, false).dataType; } 157|| (((NativeDBType.VARIANT == DbType) || (NativeDBType.PROPVARIANT == DbType)) 247case NativeDBType.EMPTY: 248case NativeDBType.NULL: 251case NativeDBType.I2: 254case NativeDBType.I4: 257case NativeDBType.R4: 260case NativeDBType.R8: 263case NativeDBType.CY: 266case NativeDBType.DATE: 269case NativeDBType.BSTR: 272case NativeDBType.IDISPATCH: 275case NativeDBType.ERROR: 278case NativeDBType.BOOL: 281case NativeDBType.VARIANT: 284case NativeDBType.IUNKNOWN: 287case NativeDBType.DECIMAL: 290case NativeDBType.I1: 293case NativeDBType.UI1: 296case NativeDBType.UI2: 299case NativeDBType.UI4: 302case NativeDBType.I8: 305case NativeDBType.UI8: 308case NativeDBType.FILETIME: 311case NativeDBType.GUID: 314case NativeDBType.BYTES: 317case NativeDBType.WSTR: 320case NativeDBType.NUMERIC: 323case NativeDBType.DBDATE: 326case NativeDBType.DBTIME: 329case NativeDBType.DBTIMESTAMP: 332case NativeDBType.PROPVARIANT: 335case NativeDBType.HCHAPTER: 338case (NativeDBType.BYREF | NativeDBType.BYTES): 341case (NativeDBType.BYREF | NativeDBType.WSTR): 364case NativeDBType.BYTES: 367case NativeDBType.WSTR: 370case (NativeDBType.BYREF | NativeDBType.BYTES): 373case (NativeDBType.BYREF | NativeDBType.WSTR): 407case NativeDBType.EMPTY: 410case NativeDBType.NULL: // language null - no representation, use DBNull 413case NativeDBType.I2: 416case NativeDBType.I4: 419case NativeDBType.R4: 422case NativeDBType.R8: 425case NativeDBType.CY: 428case NativeDBType.DATE: 431case NativeDBType.BSTR: 434case NativeDBType.IDISPATCH: 437case NativeDBType.ERROR: 440case NativeDBType.BOOL: 443case NativeDBType.VARIANT: 446case NativeDBType.IUNKNOWN: 449case NativeDBType.DECIMAL: 452case NativeDBType.I1: 460case NativeDBType.UI1: 463case NativeDBType.UI2: 471case NativeDBType.UI4: 479case NativeDBType.I8: 482case NativeDBType.UI8: 490case NativeDBType.FILETIME: 493case NativeDBType.GUID: 496case NativeDBType.BYTES: 499case NativeDBType.WSTR: 507case NativeDBType.NUMERIC: 510case NativeDBType.DBDATE: 513case NativeDBType.DBTIME: 516case NativeDBType.DBTIMESTAMP: 519case NativeDBType.PROPVARIANT: 522case (NativeDBType.BYREF | NativeDBType.BYTES): 525case (NativeDBType.BYREF | NativeDBType.WSTR): 557Debug.Assert((NativeDBType.BOOL == DbType), "Value_BOOL"); 563Debug.Assert((NativeDBType.BOOL == DbType), "Value_BOOL"); 570Debug.Assert((NativeDBType.BSTR == DbType), "Value_BSTR"); 592Debug.Assert((NativeDBType.BSTR == DbType), "Value_BSTR"); 599Debug.Assert(((NativeDBType.BYREF | NativeDBType.BYTES) == DbType), "Value_ByRefBYTES"); 622Debug.Assert((NativeDBType.BYREF | NativeDBType.BYTES) == DbType, "Value_ByRefBYTES"); 640Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR"); 663Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR"); 680Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR"); 697Debug.Assert(NativeDBType.BYTES == DbType, "Value_BYTES"); 716Debug.Assert(NativeDBType.CY == DbType, "Value_CY"); 721Debug.Assert(NativeDBType.CY == DbType, "Value_CY"); 728Debug.Assert(NativeDBType.DATE == DbType, "Value_DATE"); 733Debug.Assert(NativeDBType.DATE == DbType, "Value_DATE"); 740Debug.Assert(NativeDBType.DBDATE == DbType, "Value_DBDATE"); 745Debug.Assert(NativeDBType.DBDATE == DbType, "Value_DATE"); 752Debug.Assert(NativeDBType.DBTIME == DbType, "Value_DBTIME"); 757Debug.Assert(NativeDBType.DBTIME == DbType, "Value_DBTIME"); 764Debug.Assert(NativeDBType.DBTIMESTAMP == DbType, "Value_DBTIMESTAMP"); 769Debug.Assert(NativeDBType.DBTIMESTAMP == DbType, "Value_DBTIMESTAMP"); 776Debug.Assert(NativeDBType.DECIMAL == DbType, "Value_DECIMAL"); 788Debug.Assert(NativeDBType.DECIMAL == DbType, "Value_DECIMAL"); 807Debug.Assert(NativeDBType.ERROR == DbType, "Value_ERROR"); 812Debug.Assert(NativeDBType.ERROR == DbType, "Value_ERROR"); 819Debug.Assert(NativeDBType.FILETIME == DbType, "Value_FILETIME"); 825Debug.Assert(NativeDBType.FILETIME == DbType, "Value_FILETIME"); 833Debug.Assert(NativeDBType.GUID == DbType, "Value_GUID"); 838Debug.Assert(NativeDBType.GUID == DbType, "Value_GUID"); 846Debug.Assert(NativeDBType.HCHAPTER == DbType, "Value_HCHAPTER"); 853Debug.Assert(NativeDBType.I1 == DbType, "Value_I1"); 859Debug.Assert(NativeDBType.I1 == DbType, "Value_I1"); 866Debug.Assert(NativeDBType.I2 == DbType, "Value_I2"); 871Debug.Assert(NativeDBType.I2 == DbType, "Value_I2"); 878Debug.Assert(NativeDBType.I4 == DbType, "Value_I4"); 883Debug.Assert(NativeDBType.I4 == DbType, "Value_I4"); 890Debug.Assert(NativeDBType.I8 == DbType, "Value_I8"); 895Debug.Assert(NativeDBType.I8 == DbType, "Value_I8"); 902Debug.Assert(NativeDBType.IDISPATCH == DbType, "Value_IDISPATCH"); 923Debug.Assert(NativeDBType.IDISPATCH == DbType, "Value_IDISPATCH"); 931Debug.Assert(NativeDBType.IUNKNOWN == DbType, "Value_IUNKNOWN"); 952Debug.Assert(NativeDBType.IUNKNOWN == DbType, "Value_IUNKNOWN"); 960Debug.Assert(NativeDBType.NUMERIC == DbType, "Value_NUMERIC"); 965Debug.Assert(NativeDBType.NUMERIC == DbType, "Value_NUMERIC"); 979Debug.Assert(NativeDBType.R4 == DbType, "Value_R4"); 985Debug.Assert(NativeDBType.R4 == DbType, "Value_R4"); 992Debug.Assert(NativeDBType.R8 == DbType, "Value_R8"); 998Debug.Assert(NativeDBType.R8 == DbType, "Value_I4"); 1005Debug.Assert(NativeDBType.UI1 == DbType, "Value_UI1"); 1010Debug.Assert(NativeDBType.UI1 == DbType, "Value_UI1"); 1017Debug.Assert(NativeDBType.UI2 == DbType, "Value_UI2"); 1022Debug.Assert(NativeDBType.UI2 == DbType, "Value_UI2"); 1029Debug.Assert(NativeDBType.UI4 == DbType, "Value_UI4"); 1034Debug.Assert(NativeDBType.UI4 == DbType, "Value_UI4"); 1041Debug.Assert(NativeDBType.UI8 == DbType, "Value_UI8"); 1046Debug.Assert(NativeDBType.UI8 == DbType, "Value_UI8"); 1053Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR"); 1061Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR"); 1074Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR"); 1085Debug.Assert((NativeDBType.VARIANT == DbType) || (NativeDBType.PROPVARIANT == DbType), "Value_VARIANT"); 1090Debug.Assert((NativeDBType.VARIANT == DbType) || (NativeDBType.PROPVARIANT == DbType), "Value_VARIANT"); 1101case NativeDBType.BOOL: 1104case NativeDBType.VARIANT: 1123case NativeDBType.BYTES: 1126case NativeDBType.VARIANT: 1129case (NativeDBType.BYREF | NativeDBType.BYTES): 1138case NativeDBType.BYTES: 1141case (NativeDBType.BYREF | NativeDBType.BYTES): 1161case NativeDBType.UI1: 1164case NativeDBType.VARIANT: 1183case NativeDBType.HCHAPTER: 1203case NativeDBType.DATE: 1206case NativeDBType.DBDATE: 1209case NativeDBType.DBTIMESTAMP: 1212case NativeDBType.FILETIME: 1215case NativeDBType.VARIANT: 1233case NativeDBType.CY: 1236case NativeDBType.DECIMAL: 1239case NativeDBType.NUMERIC: 1242case NativeDBType.UI8: 1245case NativeDBType.VARIANT: 1263case NativeDBType.GUID: 1281case NativeDBType.I2: 1284case NativeDBType.I1: 1287case NativeDBType.VARIANT: 1311case NativeDBType.I4: 1314case NativeDBType.UI2: 1317case NativeDBType.VARIANT: 1341case NativeDBType.I8: 1344case NativeDBType.UI4: 1347case NativeDBType.VARIANT: 1371case NativeDBType.R4: 1374case NativeDBType.VARIANT: 1392case NativeDBType.R8: 1395case NativeDBType.VARIANT: 1414case NativeDBType.BSTR: 1417case NativeDBType.VARIANT: 1420case NativeDBType.WSTR: 1423case (NativeDBType.BYREF | NativeDBType.WSTR): 1432case NativeDBType.WSTR: 1435case (NativeDBType.BYREF | NativeDBType.WSTR):
fx\src\data\System\Data\OleDb\DBBindings.cs (8)
173case (NativeDBType.BSTR): // ADP.PtrSize 174case (NativeDBType.HCHAPTER): // ADP.PtrSize 175case (NativeDBType.PROPVARIANT): // sizeof(PROPVARIANT) 176case (NativeDBType.VARIANT): // 16 or 24 (8 + ADP.PtrSize *2) 177case (NativeDBType.BYREF | NativeDBType.BYTES): // ADP.PtrSize 178case (NativeDBType.BYREF | NativeDBType.WSTR): // ADP.PtrSize
fx\src\data\System\Data\OleDb\OLEDB_Enum.cs (147)
158static private readonly NativeDBType D_Binary = new NativeDBType(0xff, -1, true, false, OleDbType.Binary, NativeDBType.BYTES, S_BINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 0 159static private readonly NativeDBType D_Boolean = new NativeDBType(0xff, 2, true, false, OleDbType.Boolean, NativeDBType.BOOL, S_BOOL, typeof(System.Boolean), NativeDBType.BOOL, DbType.Boolean ); // 1 - integer2 (variant_bool) 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) 161static private readonly NativeDBType D_Char = new NativeDBType(0xff, -1, true, false, OleDbType.Char, NativeDBType.STR, S_CHAR, typeof(System.String), NativeDBType.WSTR/*STR*/, DbType.AnsiStringFixedLength); // 3 - (ansi pointer) 162static private readonly NativeDBType D_Currency = new NativeDBType( 19, 8, true, false, OleDbType.Currency, NativeDBType.CY, S_CY, typeof(System.Decimal), NativeDBType.CY, DbType.Currency ); // 4 - integer8 163static private 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 164static private 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) 165static private 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) 166static private 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) 167static private readonly NativeDBType D_Decimal = new NativeDBType( 28, 16, true, false, OleDbType.Decimal, NativeDBType.DECIMAL, S_DECIMAL, typeof(System.Decimal), NativeDBType.DECIMAL, DbType.Decimal ); // 9 - (tagDec) // MDAC 68447 168static private readonly NativeDBType D_Error = new NativeDBType(0xff, 4, true, false, OleDbType.Error, NativeDBType.ERROR, S_ERROR, typeof(System.Int32), NativeDBType.ERROR, DbType.Int32 ); // 10 - integer4 169static private 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 // MDAC 59504 170static private 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] 171static private readonly NativeDBType D_TinyInt = new NativeDBType( 3, 1, true, false, OleDbType.TinyInt, NativeDBType.I1, S_I1, typeof(System.Int16), NativeDBType.I1, DbType.SByte ); // 13 - integer1 // MDAC 59492 172static private readonly NativeDBType D_SmallInt = new NativeDBType( 5, 2, true, false, OleDbType.SmallInt, NativeDBType.I2, S_I2, typeof(System.Int16), NativeDBType.I2, DbType.Int16 ); // 14 - integer2 173static private readonly NativeDBType D_Integer = new NativeDBType( 10, 4, true, false, OleDbType.Integer, NativeDBType.I4, S_I4, typeof(System.Int32), NativeDBType.I4, DbType.Int32 ); // 15 - integer4 174static private readonly NativeDBType D_BigInt = new NativeDBType( 19, 8, true, false, OleDbType.BigInt, NativeDBType.I8, S_I8, typeof(System.Int64), NativeDBType.I8, DbType.Int64 ); // 16 - integer8 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 177static private readonly NativeDBType D_LongVarBinary = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarBinary, NativeDBType.BYTES, S_LONGVARBINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 19 178static private readonly NativeDBType D_LongVarChar = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarChar, NativeDBType.STR, S_LONGVARCHAR, typeof(System.String), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 20 - (ansi pointer) 179static private readonly NativeDBType D_Numeric = new NativeDBType( 28, 19, true, false, OleDbType.Numeric, NativeDBType.NUMERIC, S_NUMERIC, typeof(System.Decimal), NativeDBType.NUMERIC, DbType.Decimal ); // 21 - (tagDB_Numeric) 180static private readonly NativeDBType D_PropVariant = new NativeDBType(0xff, NativeOledbWrapper.SizeOfPROPVARIANT, 181true, false, OleDbType.PropVariant, NativeDBType.PROPVARIANT, S_PROPVARIANT, typeof(System.Object), NativeDBType.VARIANT, DbType.Object ); // 22 182static private readonly NativeDBType D_Single = new NativeDBType( 7, 4, true, false, OleDbType.Single, NativeDBType.R4, S_R4, typeof(System.Single), NativeDBType.R4, DbType.Single ); // 23 - single 183static private readonly NativeDBType D_Double = new NativeDBType( 15, 8, true, false, OleDbType.Double, NativeDBType.R8, S_R8, typeof(System.Double), NativeDBType.R8, DbType.Double ); // 24 - double 184static private readonly NativeDBType D_UnsignedTinyInt = new NativeDBType( 3, 1, true, false, OleDbType.UnsignedTinyInt, NativeDBType.UI1, S_UI1, typeof(System.Byte), NativeDBType.UI1, DbType.Byte ); // 25 - byte7 185static private readonly NativeDBType D_UnsignedSmallInt = new NativeDBType( 5, 2, true, false, OleDbType.UnsignedSmallInt, NativeDBType.UI2, S_UI2, typeof(System.Int32), NativeDBType.UI2, DbType.UInt16 ); // 26 - unsigned integer2 186static private readonly NativeDBType D_UnsignedInt = new NativeDBType( 10, 4, true, false, OleDbType.UnsignedInt, NativeDBType.UI4, S_UI4, typeof(System.Int64), NativeDBType.UI4, DbType.UInt32 ); // 27 - unsigned integer4 187static private readonly NativeDBType D_UnsignedBigInt = new NativeDBType( 20, 8, true, false, OleDbType.UnsignedBigInt, NativeDBType.UI8, S_UI8, typeof(System.Decimal), NativeDBType.UI8, DbType.UInt64 ); // 28 - unsigned integer8 188static private readonly NativeDBType D_VarBinary = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.BYTES, S_VARBINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 29 189static private readonly NativeDBType D_VarChar = new NativeDBType(0xff, -1, false, false, OleDbType.VarChar, NativeDBType.STR, S_VARCHAR, typeof(System.String), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 30 - (ansi pointer) 190static private readonly NativeDBType D_Variant = new NativeDBType(0xff, ODB.SizeOf_Variant, true, false, OleDbType.Variant, NativeDBType.VARIANT, S_VARIANT, typeof(System.Object), NativeDBType.VARIANT, DbType.Object ); // 31 - ubyte[16] (variant) 191static private readonly NativeDBType D_VarNumeric = new NativeDBType( 255, 16, true, false, OleDbType.VarNumeric, NativeDBType.VARNUMERIC, S_VARNUMERIC, typeof(System.Decimal), NativeDBType.DECIMAL, DbType.VarNumeric); // 32 - (unicode pointer) 192static private readonly NativeDBType D_WChar = new NativeDBType(0xff, -1, true, false, OleDbType.WChar, NativeDBType.WSTR, S_WCHAR, typeof(System.String), NativeDBType.WSTR, DbType.StringFixedLength); // 33 - (unicode pointer) 193static private readonly NativeDBType D_VarWChar = new NativeDBType(0xff, -1, false, false, OleDbType.VarWChar, NativeDBType.WSTR, S_WVARCHAR, typeof(System.String), NativeDBType.WSTR, DbType.String ); // 34 - (unicode pointer) 194static private readonly NativeDBType D_LongVarWChar = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarWChar, NativeDBType.WSTR, S_WLONGVARCHAR, typeof(System.String), NativeDBType.WSTR, DbType.String ); // 35 - (unicode pointer) 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) 196static private readonly NativeDBType D_Empty = new NativeDBType(0xff, 0, false, false, OleDbType.Empty, NativeDBType.EMPTY, "", null, NativeDBType.EMPTY, DbType.Object ); // 37 - invalid param default 197static private readonly NativeDBType D_Xml = new NativeDBType(0xff, -1, false, false, OleDbType.VarWChar, NativeDBType.XML, S_XML, typeof(System.String), NativeDBType.WSTR, DbType.String ); // 38 - (unicode pointer) 198static private readonly NativeDBType D_Udt = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.UDT, S_BINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 39 - (unicode pointer) 200static internal readonly NativeDBType Default = D_VarWChar; // MDAC 65324 248static internal NativeDBType FromDataType(OleDbType enumOleDbType) { 292static internal NativeDBType FromSystemType(object value) { 296case TypeCode.Empty: return NativeDBType.D_Empty; 297case TypeCode.Object: return NativeDBType.D_Variant; 299case TypeCode.Boolean: return NativeDBType.D_Boolean; 300case TypeCode.Char: return NativeDBType.D_Char; 301case TypeCode.SByte: return NativeDBType.D_TinyInt; 302case TypeCode.Byte: return NativeDBType.D_UnsignedTinyInt; 303case TypeCode.Int16: return NativeDBType.D_SmallInt; 304case TypeCode.UInt16: return NativeDBType.D_UnsignedSmallInt; 305case TypeCode.Int32: return NativeDBType.D_Integer; 306case TypeCode.UInt32: return NativeDBType.D_UnsignedInt; 307case TypeCode.Int64: return NativeDBType.D_BigInt; 308case TypeCode.UInt64: return NativeDBType.D_UnsignedBigInt; 309case TypeCode.Single: return NativeDBType.D_Single; 310case TypeCode.Double: return NativeDBType.D_Double; 311case TypeCode.Decimal: return NativeDBType.D_Decimal; 312case TypeCode.DateTime: return NativeDBType.D_DBTimeStamp; 313case TypeCode.String: return NativeDBType.D_VarWChar; 318return NativeDBType.D_VarBinary; 321return NativeDBType.D_Guid; 324return NativeDBType.D_DBTime; 327return NativeDBType.D_Variant; 332static internal NativeDBType FromDbType(DbType dbType) { 364static internal NativeDBType FromDBType(short dbType, bool isLong, bool isFixed) { 407if (0 != (NativeDBType.VECTOR & dbType)) {
fx\src\data\System\Data\OleDb\OleDbCommandBuilder.cs (1)
224parameter.OleDbType = NativeDBType.FromDBType(wType, false, false).enumOleDbType;
fx\src\data\System\Data\OleDb\OleDbDataReader.cs (12)
485if (filterChapters && (NativeDBType.HCHAPTER == dbColumnInfo.wType)) { 491NativeDBType dbType = NativeDBType.FromDBType(dbColumnInfo.wType, islong, isfixed); 1448Debug.Assert(NativeDBType.STR != getType, "Should have bound as WSTR"); 1449Debug.Assert(!NativeDBType.HasHighBit(getType), "CreateAccessor - unexpected high bits on datatype"); 1454getType = (short)((ushort) getType | (ushort) NativeDBType.BYREF); 1469getType = (short)((ushort) getType | (ushort)NativeDBType.BYREF); 1471else if ((NativeDBType.WSTR == getType) && (-1 != info.size)) { // WebData 99298 1486getType = (short)((ushort) getType | (ushort)NativeDBType.BYREF); 2113NativeDBType dbType = NativeDBType.FromDBType(wType, islong, isfixed); 2289internal NativeDBType type;
fx\src\data\System\Data\OleDb\OleDbMetaDataFactory.cs (2)
405NativeDBType nativeType = NativeDBType.FromDBType(nativeDataType,(bool)newRow[isLong], (bool)newRow[isFixed]);
fx\src\data\System\Data\OleDb\OleDbParameter.cs (28)
23private NativeDBType _metaType; 31private NativeDBType _coerceMetaType; 111NativeDBType dbtype = _metaType; 114_metaType = NativeDBType.FromDbType(value); 134NativeDBType dbtype = _metaType; 137_metaType = NativeDBType.FromDataType(value); 263NativeDBType dbtype = GetBindType(value); 301if (NativeDBType.STR == dbtype.dbType) { 304else if (NativeDBType.WSTR == dbtype.dbType) { 311wtype |= NativeDBType.BYREF; 328if (NativeDBType.WSTR == dbtype.wType) { 333Debug.Assert(NativeDBType.STR != dbtype.wType, "should have ANSI binding, describing is okay"); 338if (NativeDBType.STR == dbtype.dbType) { // WebData 98140 346wtype |= NativeDBType.BYREF; 350if (NativeDBType.WSTR == wtype) { // allow space for null termination character 355Debug.Assert(NativeDBType.STR != dbtype.wType, "should have ANSI binding, describing is okay"); 361wtype |= NativeDBType.BYREF; 408private static object CoerceValue(object value, NativeDBType destinationType) { 416else if ((NativeDBType.CY == destinationType.dbType) && (typeof(string) == currentType)) { 436private NativeDBType GetBindType(object value) { 437NativeDBType dbtype = _metaType; 440dbtype = OleDb.NativeDBType.Default; 443dbtype = NativeDBType.FromSystemType(value); 459NativeDBType metaType = _metaType; 462|| ((NativeDBType.DECIMAL == metaType.dbType) || (NativeDBType.NUMERIC == metaType.dbType) 479else if (!ShouldSerializePrecision() && !ShouldSerializeScale() && ((NativeDBType.DECIMAL == _metaType.wType) || (NativeDBType.NUMERIC == _metaType.wType))) { // MDAC 71441
fx\src\data\System\Data\OleDb\RowBinding.cs (8)
362case (NativeDBType.BYREF | NativeDBType.BYTES): 363case (NativeDBType.BYREF | NativeDBType.WSTR): 367case NativeDBType.PROPVARIANT: 371case NativeDBType.VARIANT: 375case NativeDBType.BSTR: 379case NativeDBType.HCHAPTER: