483 references to DbType
System.Activities.DurableInstancing (1)
System\Activities\DurableInstancing\StoreUtilities.cs (1)
153else if (sqlParameter.DbType == System.Data.DbType.Binary)
System.Data (242)
fx\src\data\System\Data\Common\AdapterUtil.cs (1)
1569static internal ArgumentException DbTypeNotSupported(System.Data.DbType type, Type enumtype) {
fx\src\data\System\Data\Common\DBCommandBuilder.cs (1)
1038p.DbType = DbType.Int32;
fx\src\data\System\Data\Common\DbDataAdapter.cs (1)
649Debug.Assert(DbType.Int32 == parameter.DbType, "unexpected DbType");
fx\src\data\System\Data\Common\DBParameter.cs (1)
27abstract public DbType DbType {
fx\src\data\System\Data\IDataParameter.cs (1)
14DbType DbType {
fx\src\data\System\Data\Odbc\Odbc32.cs (58)
776static private readonly TypeMap _BigInt = new TypeMap(OdbcType.BigInt, DbType.Int64, typeof(Int64), ODBC32.SQL_TYPE.BIGINT, ODBC32.SQL_C.SBIGINT, ODBC32.SQL_C.SBIGINT, 8, 20, true); 777static private readonly TypeMap _Binary = new TypeMap(OdbcType.Binary, DbType.Binary, typeof(byte[]), ODBC32.SQL_TYPE.BINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 778static private readonly TypeMap _Bit = new TypeMap(OdbcType.Bit, DbType.Boolean, typeof(Boolean), ODBC32.SQL_TYPE.BIT, ODBC32.SQL_C.BIT, ODBC32.SQL_C.BIT, 1, 1, false); 779static internal readonly TypeMap _Char = new TypeMap(OdbcType.Char, DbType.AnsiStringFixedLength, typeof(String), ODBC32.SQL_TYPE.CHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.CHAR, -1, -1, false); 780static private readonly TypeMap _DateTime = new TypeMap(OdbcType.DateTime, DbType.DateTime, typeof(DateTime), ODBC32.SQL_TYPE.TYPE_TIMESTAMP, ODBC32.SQL_C.TYPE_TIMESTAMP, ODBC32.SQL_C.TYPE_TIMESTAMP, 16, 23, false); 781static private readonly TypeMap _Date = new TypeMap(OdbcType.Date, DbType.Date, typeof(DateTime), ODBC32.SQL_TYPE.TYPE_DATE, ODBC32.SQL_C.TYPE_DATE, ODBC32.SQL_C.TYPE_DATE, 6, 10, false); 782static private readonly TypeMap _Time = new TypeMap(OdbcType.Time, DbType.Time, typeof(TimeSpan), ODBC32.SQL_TYPE.TYPE_TIME, ODBC32.SQL_C.TYPE_TIME, ODBC32.SQL_C.TYPE_TIME, 6, 12, false); 783static private readonly TypeMap _Decimal = new TypeMap(OdbcType.Decimal, DbType.Decimal, typeof(Decimal), ODBC32.SQL_TYPE.DECIMAL, ODBC32.SQL_C.NUMERIC, ODBC32.SQL_C.NUMERIC, 19, ADP.DecimalMaxPrecision28, false); 785static private readonly TypeMap _Double = new TypeMap(OdbcType.Double, DbType.Double, typeof(Double), ODBC32.SQL_TYPE.DOUBLE, ODBC32.SQL_C.DOUBLE, ODBC32.SQL_C.DOUBLE, 8, 15, false); 786static internal readonly TypeMap _Image = new TypeMap(OdbcType.Image, DbType.Binary, typeof(Byte[]), ODBC32.SQL_TYPE.LONGVARBINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 787static private readonly TypeMap _Int = new TypeMap(OdbcType.Int, DbType.Int32, typeof(Int32), ODBC32.SQL_TYPE.INTEGER, ODBC32.SQL_C.SLONG, ODBC32.SQL_C.SLONG, 4, 10, true); 788static private readonly TypeMap _NChar = new TypeMap(OdbcType.NChar, DbType.StringFixedLength, typeof(String), ODBC32.SQL_TYPE.WCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.WCHAR, -1, -1, false); 789static internal readonly TypeMap _NText = new TypeMap(OdbcType.NText, DbType.String, typeof(String), ODBC32.SQL_TYPE.WLONGVARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.WCHAR, -1, -1, false); 790static private readonly TypeMap _Numeric = new TypeMap(OdbcType.Numeric, DbType.Decimal, typeof(Decimal), ODBC32.SQL_TYPE.NUMERIC, ODBC32.SQL_C.NUMERIC, ODBC32.SQL_C.NUMERIC, 19, ADP.DecimalMaxPrecision28, false); 791static internal readonly TypeMap _NVarChar = new TypeMap(OdbcType.NVarChar, DbType.String, typeof(String), ODBC32.SQL_TYPE.WVARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.WCHAR, -1, -1, false); 792static private readonly TypeMap _Real = new TypeMap(OdbcType.Real, DbType.Single, typeof(Single), ODBC32.SQL_TYPE.REAL, ODBC32.SQL_C.REAL, ODBC32.SQL_C.REAL, 4, 7, false); 793static private readonly TypeMap _UniqueId = new TypeMap(OdbcType.UniqueIdentifier, DbType.Guid, typeof(Guid), ODBC32.SQL_TYPE.GUID, ODBC32.SQL_C.GUID, ODBC32.SQL_C.GUID, 16, 36, false); 794static private readonly TypeMap _SmallDT = new TypeMap(OdbcType.SmallDateTime, DbType.DateTime, typeof(DateTime), ODBC32.SQL_TYPE.TYPE_TIMESTAMP, ODBC32.SQL_C.TYPE_TIMESTAMP, ODBC32.SQL_C.TYPE_TIMESTAMP, 16, 23, false); 795static private readonly TypeMap _SmallInt = new TypeMap(OdbcType.SmallInt, DbType.Int16, typeof(Int16), ODBC32.SQL_TYPE.SMALLINT, ODBC32.SQL_C.SSHORT, ODBC32.SQL_C.SSHORT, 2, 5, true); 796static internal readonly TypeMap _Text = new TypeMap(OdbcType.Text, DbType.AnsiString, typeof(String), ODBC32.SQL_TYPE.LONGVARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.CHAR, -1, -1, false); 797static private readonly TypeMap _Timestamp = new TypeMap(OdbcType.Timestamp, DbType.Binary, typeof(Byte[]), ODBC32.SQL_TYPE.BINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 798static private readonly TypeMap _TinyInt = new TypeMap(OdbcType.TinyInt, DbType.Byte, typeof(Byte), ODBC32.SQL_TYPE.TINYINT, ODBC32.SQL_C.UTINYINT, ODBC32.SQL_C.UTINYINT, 1, 3, true); 799static private readonly TypeMap _VarBinary = new TypeMap(OdbcType.VarBinary, DbType.Binary, typeof(Byte[]), ODBC32.SQL_TYPE.VARBINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 800static internal readonly TypeMap _VarChar = new TypeMap(OdbcType.VarChar, DbType.AnsiString, typeof(String), ODBC32.SQL_TYPE.VARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.CHAR, -1, -1, false); 801static private readonly TypeMap _Variant = new TypeMap(OdbcType.Binary, DbType.Binary, typeof(object), ODBC32.SQL_TYPE.SS_VARIANT, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 802static private readonly TypeMap _UDT = new TypeMap(OdbcType.Binary, DbType.Binary, typeof(object), ODBC32.SQL_TYPE.SS_UDT, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 803static private readonly TypeMap _XML = new TypeMap(OdbcType.Text, DbType.AnsiString, typeof(String), ODBC32.SQL_TYPE.LONGVARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.CHAR, -1, -1, false); 806internal readonly DbType _dbType; 818private TypeMap(OdbcType odbcType, DbType dbType, Type type, ODBC32.SQL_TYPE sql_type, ODBC32.SQL_C sql_c, ODBC32.SQL_C param_sql_c, int bsize, int csize, bool signType) { 862static internal TypeMap FromDbType(DbType dbType) { 864case DbType.AnsiString: return _VarChar; 865case DbType.AnsiStringFixedLength: return _Char; 866case DbType.Binary: return _VarBinary; 867case DbType.Byte: return _TinyInt; 868case DbType.Boolean: return _Bit; 869case DbType.Currency: return _Decimal; 871case DbType.Date: return _Date; 872case DbType.Time: return _Time; 873case DbType.DateTime: return _DateTime; 874case DbType.Decimal: return _Decimal; 875case DbType.Double: return _Double; 876case DbType.Guid: return _UniqueId; 877case DbType.Int16: return _SmallInt; 878case DbType.Int32: return _Int; 879case DbType.Int64: return _BigInt; 880case DbType.Single: return _Real; 881case DbType.String: return _NVarChar; 882case DbType.StringFixedLength: return _NChar; 883case DbType.Object: 884case DbType.SByte: 885case DbType.UInt16: 886case DbType.UInt32: 887case DbType.UInt64: 888case DbType.VarNumeric: 982case DbType.Int64: 984case DbType.Int32: 986case DbType.Int16: 994case DbType.Byte:
fx\src\data\System\Data\Odbc\OdbcParameter.cs (1)
154override public System.Data.DbType DbType {
fx\src\data\System\Data\OleDb\OLEDB_Enum.cs (68)
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) 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) 207internal readonly DbType enumDbType; // enum System.Data.DbType 221private NativeDBType(Byte maxpre, int fixlen, bool isfixed, bool islong, OleDbType enumOleDbType, short dbType, string dbstring, Type dataType, short wType, DbType enumDbType) { 332static internal NativeDBType FromDbType(DbType dbType) { 334case DbType.AnsiString: return D_VarChar; 335case DbType.AnsiStringFixedLength: return D_Char; 336case DbType.Binary: return D_VarBinary; 337case DbType.Byte: return D_UnsignedTinyInt; 338case DbType.Boolean: return D_Boolean; 339case DbType.Currency: return D_Currency; 340case DbType.Date: return D_DBDate; 341case DbType.DateTime: return D_DBTimeStamp; 342case DbType.Decimal: return D_Decimal; 343case DbType.Double: return D_Double; 344case DbType.Guid: return D_Guid; 345case DbType.Int16: return D_SmallInt; 346case DbType.Int32: return D_Integer; 347case DbType.Int64: return D_BigInt; 348case DbType.Object: return D_Variant; 349case DbType.SByte: return D_TinyInt; 350case DbType.Single: return D_Single; 351case DbType.String: return D_VarWChar; 352case DbType.StringFixedLength: return D_WChar; 353case DbType.Time: return D_DBTime; 354case DbType.UInt16: return D_UnsignedSmallInt; 355case DbType.UInt32: return D_UnsignedInt; 356case DbType.UInt64: return D_UnsignedBigInt; 357case DbType.VarNumeric: return D_VarNumeric; 358case DbType.Xml: return D_Xml;
fx\src\data\System\Data\OleDb\OleDbParameter.cs (1)
106override public DbType DbType {
fx\src\data\System\Data\Sql\SqlMetaData.cs (37)
274public DbType DbType { 1509private static DbType[] sxm_rgSqlDbTypeToDbType = { 1510DbType.Int64, // SqlDbType.BigInt 1511DbType.Binary, // SqlDbType.Binary 1512DbType.Boolean, // SqlDbType.Bit 1513DbType.AnsiString, // SqlDbType.Char 1514DbType.DateTime, // SqlDbType.DateTime 1515DbType.Decimal, // SqlDbType.Decimal 1516DbType.Double, // SqlDbType.Float 1517DbType.Binary, // SqlDbType.Image 1518DbType.Int32, // SqlDbType.Int 1519DbType.Currency, // SqlDbType.Money 1520DbType.String, // SqlDbType.NChar 1521DbType.String, // SqlDbType.NText 1522DbType.String, // SqlDbType.NVarChar 1523DbType.Single, // SqlDbType.Real 1524DbType.Guid, // SqlDbType.UniqueIdentifier 1525DbType.DateTime, // SqlDbType.SmallDateTime 1526DbType.Int16, // SqlDbType.SmallInt 1527DbType.Currency, // SqlDbType.SmallMoney 1528DbType.AnsiString, // SqlDbType.Text 1529DbType.Binary, // SqlDbType.Timestamp 1530DbType.Byte, // SqlDbType.TinyInt 1531DbType.Binary, // SqlDbType.VarBinary 1532DbType.AnsiString, // SqlDbType.VarChar 1533DbType.Object, // SqlDbType.Variant 1534DbType.Object, // SqlDbType.Row 1535DbType.Xml, // SqlDbType.Xml 1536DbType.String, // SqlDbType.NVarChar, place holder 1537DbType.String, // SqlDbType.NVarChar, place holder 1538DbType.String, // SqlDbType.NVarChar, place holder 1539DbType.Object, // SqlDbType.Udt 1540DbType.Object, // SqlDbType.Structured 1541DbType.Date, // SqlDbType.Date 1542DbType.Time, // SqlDbType.Time 1543DbType.DateTime2, // SqlDbType.DateTime2 1544DbType.DateTimeOffset // SqlDbType.DateTimeOffset
fx\src\data\System\Data\SqlClient\SqlDependencyListener.cs (1)
437param.DbType = DbType.Guid;
fx\src\data\System\Data\SqlClient\SqlEnums.cs (67)
41internal readonly DbType DbType; 61public MetaType(byte precision, byte scale, int fixedLength, bool isFixed, bool isLong, bool isPlp, byte tdsType, byte nullableTdsType, string typeName, Type classType, Type sqlType, SqlDbType sqldbType, DbType dbType, byte propBytes) { 220internal static MetaType GetMetaTypeFromDbType(DbType target) { 223case DbType.AnsiString: return MetaVarChar; 224case DbType.AnsiStringFixedLength: return MetaChar; 225case DbType.Binary: return MetaVarBinary; 226case DbType.Byte: return MetaTinyInt; 227case DbType.Boolean: return MetaBit; 228case DbType.Currency: return MetaMoney; 229case DbType.Date: 230case DbType.DateTime: return MetaDateTime; 231case DbType.Decimal: return MetaDecimal; 232case DbType.Double: return MetaFloat; 233case DbType.Guid: return MetaUniqueId; 234case DbType.Int16: return MetaSmallInt; 235case DbType.Int32: return MetaInt; 236case DbType.Int64: return MetaBigInt; 237case DbType.Object: return MetaVariant; 238case DbType.Single: return MetaReal; 239case DbType.String: return MetaNVarChar; 240case DbType.StringFixedLength: return MetaNChar; 241case DbType.Time: return MetaDateTime; 242case DbType.Xml: return MetaXml; 243case DbType.DateTime2: return MetaDateTime2; 244case DbType.DateTimeOffset: return MetaDateTimeOffset; 245case DbType.SByte: // unsupported 246case DbType.UInt16: 247case DbType.UInt32: 248case DbType.UInt64: 249case DbType.VarNumeric: 707(19, 255, 8, true, false, false, TdsEnums.SQLINT8, TdsEnums.SQLINTN, MetaTypeName.BIGINT, typeof(System.Int64), typeof(SqlInt64), SqlDbType.BigInt, DbType.Int64, 0); 710(15, 255, 8, true, false, false, TdsEnums.SQLFLT8, TdsEnums.SQLFLTN, MetaTypeName.FLOAT, typeof(System.Double), typeof(SqlDouble), SqlDbType.Float, DbType.Double, 0); 713(7, 255, 4, true, false, false, TdsEnums.SQLFLT4, TdsEnums.SQLFLTN, MetaTypeName.REAL, typeof(System.Single), typeof(SqlSingle), SqlDbType.Real, DbType.Single, 0); 718(255, 255, -1, false, false, false, TdsEnums.SQLBIGBINARY, TdsEnums.SQLBIGBINARY, MetaTypeName.BINARY, typeof(System.Byte[]), typeof(SqlBinary), SqlDbType.Binary, DbType.Binary, 2); 722(255, 255, -1, false, false, false, TdsEnums.SQLBIGBINARY, TdsEnums.SQLBIGBINARY, MetaTypeName.TIMESTAMP, typeof(System.Byte[]), typeof(SqlBinary), SqlDbType.Timestamp, DbType.Binary, 2); 725(255, 255, -1, false, false, false, TdsEnums.SQLBIGVARBINARY, TdsEnums.SQLBIGVARBINARY, MetaTypeName.VARBINARY, typeof(System.Byte[]), typeof(SqlBinary), SqlDbType.VarBinary, DbType.Binary, 2); 728(255, 255, -1, false, true, true, TdsEnums.SQLBIGVARBINARY, TdsEnums.SQLBIGVARBINARY, MetaTypeName.VARBINARY, typeof(System.Byte[]), typeof(SqlBinary), SqlDbType.VarBinary, DbType.Binary, 2); 734(255, 255, -1, false, false, false, TdsEnums.SQLVARBINARY, TdsEnums.SQLBIGBINARY, ADP.StrEmpty, typeof(System.Byte[]), typeof(SqlBinary), TdsEnums.SmallVarBinary, DbType.Binary, 2); 737(255, 255, -1, false, true, false, TdsEnums.SQLIMAGE, TdsEnums.SQLIMAGE, MetaTypeName.IMAGE, typeof(System.Byte[]), typeof(SqlBinary), SqlDbType.Image, DbType.Binary, 0); 740(255, 255, 1, true, false, false, TdsEnums.SQLBIT, TdsEnums.SQLBITN, MetaTypeName.BIT, typeof(System.Boolean), typeof(SqlBoolean), SqlDbType.Bit, DbType.Boolean, 0); 743(3, 255, 1, true, false, false, TdsEnums.SQLINT1, TdsEnums.SQLINTN, MetaTypeName.TINYINT, typeof(System.Byte), typeof(SqlByte), SqlDbType.TinyInt, DbType.Byte, 0); 746(5, 255, 2, true, false, false, TdsEnums.SQLINT2, TdsEnums.SQLINTN, MetaTypeName.SMALLINT, typeof(System.Int16), typeof(SqlInt16), SqlDbType.SmallInt, DbType.Int16, 0); 749(10, 255, 4, true, false, false, TdsEnums.SQLINT4, TdsEnums.SQLINTN, MetaTypeName.INT, typeof(System.Int32), typeof(SqlInt32), SqlDbType.Int, DbType.Int32, 0); 755(255, 255, -1, false, false, false, TdsEnums.SQLBIGCHAR, TdsEnums.SQLBIGCHAR, MetaTypeName.CHAR, typeof(System.String), typeof(SqlString), SqlDbType.Char, DbType.AnsiStringFixedLength, 7); 758(255, 255, -1, false, false, false, TdsEnums.SQLBIGVARCHAR, TdsEnums.SQLBIGVARCHAR, MetaTypeName.VARCHAR, typeof(System.String), typeof(SqlString), SqlDbType.VarChar, DbType.AnsiString, 7); 761(255, 255, -1, false, true, true, TdsEnums.SQLBIGVARCHAR, TdsEnums.SQLBIGVARCHAR, MetaTypeName.VARCHAR, typeof(System.String), typeof(SqlString), SqlDbType.VarChar, DbType.AnsiString, 7); 764(255, 255, -1, false, true, false, TdsEnums.SQLTEXT, TdsEnums.SQLTEXT, MetaTypeName.TEXT, typeof(System.String), typeof(SqlString), SqlDbType.Text, DbType.AnsiString, 0); 770(255, 255, -1, false, false, false, TdsEnums.SQLNCHAR, TdsEnums.SQLNCHAR, MetaTypeName.NCHAR, typeof(System.String), typeof(SqlString), SqlDbType.NChar, DbType.StringFixedLength, 7); 773(255, 255, -1, false, false, false, TdsEnums.SQLNVARCHAR, TdsEnums.SQLNVARCHAR, MetaTypeName.NVARCHAR, typeof(System.String), typeof(SqlString), SqlDbType.NVarChar, DbType.String, 7); 776(255, 255, -1, false, true, true, TdsEnums.SQLNVARCHAR, TdsEnums.SQLNVARCHAR, MetaTypeName.NVARCHAR, typeof(System.String), typeof(SqlString), SqlDbType.NVarChar, DbType.String, 7); 779(255, 255, -1, false, true, false, TdsEnums.SQLNTEXT, TdsEnums.SQLNTEXT, MetaTypeName.NTEXT, typeof(System.String), typeof(SqlString), SqlDbType.NText, DbType.String, 7); 785(38, 4, 17, true, false, false, TdsEnums.SQLNUMERICN, TdsEnums.SQLNUMERICN, MetaTypeName.DECIMAL, typeof(System.Decimal), typeof(SqlDecimal), SqlDbType.Decimal, DbType.Decimal, 2); 788(255, 255, -1, false, true, true, TdsEnums.SQLXMLTYPE, TdsEnums.SQLXMLTYPE, MetaTypeName.XML, typeof(System.String), typeof(SqlXml), SqlDbType.Xml, DbType.Xml, 0); 791(23, 3, 8, true, false, false, TdsEnums.SQLDATETIME, TdsEnums.SQLDATETIMN, MetaTypeName.DATETIME, typeof(System.DateTime), typeof(SqlDateTime), SqlDbType.DateTime, DbType.DateTime, 0); 794(16, 0, 4, true, false, false, TdsEnums.SQLDATETIM4, TdsEnums.SQLDATETIMN, MetaTypeName.SMALLDATETIME, typeof(System.DateTime), typeof(SqlDateTime), SqlDbType.SmallDateTime, DbType.DateTime, 0); 797(19, 255, 8, true, false, false, TdsEnums.SQLMONEY, TdsEnums.SQLMONEYN, MetaTypeName.MONEY, typeof(System.Decimal), typeof(SqlMoney), SqlDbType.Money, DbType.Currency, 0); 800(10, 255, 4, true, false, false, TdsEnums.SQLMONEY4, TdsEnums.SQLMONEYN, MetaTypeName.SMALLMONEY, typeof(System.Decimal), typeof(SqlMoney), SqlDbType.SmallMoney, DbType.Currency, 0); 803(255, 255, 16, true, false, false, TdsEnums.SQLUNIQUEID, TdsEnums.SQLUNIQUEID, MetaTypeName.ROWGUID, typeof(System.Guid), typeof(SqlGuid), SqlDbType.UniqueIdentifier, DbType.Guid, 0); 806(255, 255, -1, true, false, false, TdsEnums.SQLVARIANT, TdsEnums.SQLVARIANT, MetaTypeName.VARIANT, typeof(System.Object), typeof(System.Object), SqlDbType.Variant, DbType.Object, 0); 809(255, 255, -1, false, false, true, TdsEnums.SQLUDT, TdsEnums.SQLUDT, MetaTypeName.UDT, typeof(System.Object), typeof(System.Object), SqlDbType.Udt, DbType.Object, 0); 812(255, 255, -1, false, true, true, TdsEnums.SQLUDT, TdsEnums.SQLUDT, MetaTypeName.UDT, typeof(System.Object), typeof(System.Object), SqlDbType.Udt, DbType.Object, 0); 815(255, 255, -1, false, false, false, TdsEnums.SQLTABLE, TdsEnums.SQLTABLE, MetaTypeName.TABLE, typeof(IEnumerable<DbDataRecord>), typeof(IEnumerable<DbDataRecord>), SqlDbType.Structured, DbType.Object, 0); 820(255, 255, -1, false, false, false, TdsEnums.SQLVOID, TdsEnums.SQLVOID, "", typeof(MSS.SqlDataRecord), typeof(MSS.SqlDataRecord), SqlDbType.Structured, DbType.Object, 0); 823(255, 255, 3, true, false, false, TdsEnums.SQLDATE, TdsEnums.SQLDATE, MetaTypeName.DATE, typeof(System.DateTime), typeof(System.DateTime), SqlDbType.Date, DbType.Date, 0); 826(255, 7, -1, false, false, false, TdsEnums.SQLTIME, TdsEnums.SQLTIME, MetaTypeName.TIME, typeof(System.TimeSpan), typeof(System.TimeSpan), SqlDbType.Time, DbType.Time, 1); 829(255, 7, -1, false, false, false, TdsEnums.SQLDATETIME2, TdsEnums.SQLDATETIME2, MetaTypeName.DATETIME2, typeof(System.DateTime), typeof(System.DateTime), SqlDbType.DateTime2, DbType.DateTime2, 1); 832(255, 7, -1, false, false, false, TdsEnums.SQLDATETIMEOFFSET, TdsEnums.SQLDATETIMEOFFSET, MetaTypeName.DATETIMEOFFSET, typeof(System.DateTimeOffset), typeof(System.DateTimeOffset), SqlDbType.DateTimeOffset, DbType.DateTimeOffset, 1);
fx\src\data\System\Data\SqlClient\SqlParameter.cs (4)
283override public DbType DbType { 292value == DbType.Date || 293value == DbType.Time) { 943else if ((DbType.Currency == destinationType.DbType) && (typeof(string) == currentType)) {
System.Data.Entity (104)
System\Data\Common\DbCommandDefinition.cs (31)
93DbType dbType; 98case DbType.Binary: 101case DbType.DateTime: 102case DbType.Time: 103case DbType.DateTimeOffset: 106case DbType.Decimal: 109case DbType.String: 120internal static bool TryGetDbTypeFromPrimitiveType(PrimitiveType type, out DbType dbType) 125dbType = DbType.Binary; 128dbType = DbType.Boolean; 131dbType = DbType.Byte; 134dbType = DbType.DateTime; 137dbType = DbType.Time; 140dbType = DbType.DateTimeOffset; 143dbType = DbType.Decimal; 146dbType = DbType.Double; 149dbType = DbType.Guid; 152dbType = DbType.Single; 155dbType = DbType.SByte; 158dbType = DbType.Int16; 161dbType = DbType.Int32; 164dbType = DbType.Int64; 167dbType = DbType.String; 170dbType = default(DbType); 175private static void PopulateBinaryParameter(DbParameter parameter, TypeUsage type, DbType dbType, bool isOutParam) 184private static void PopulateDecimalParameter (DbParameter parameter, TypeUsage type, DbType dbType) 204private static void PopulateDateTimeParameter(DbParameter parameter, TypeUsage type, DbType dbType) 240parameter.DbType = (unicode ? DbType.StringFixedLength : DbType.AnsiStringFixedLength); 244parameter.DbType = (unicode ? DbType.String : DbType.AnsiString);
System\Data\Common\Internal\DbTypeMap.cs (24)
53internal static bool TryGetModelTypeUsage(DbType dbType, out TypeUsage modelType) 57case DbType.AnsiString: 61case DbType.AnsiStringFixedLength: 65case DbType.String: 69case DbType.StringFixedLength: 73case DbType.Xml: 77case DbType.Binary: 81case DbType.Boolean: 85case DbType.Byte: 89case DbType.DateTime: 93case DbType.Date: 97case DbType.DateTime2: 101case DbType.Time: 105case DbType.DateTimeOffset: 109case DbType.Decimal: 113case DbType.Currency: 117case DbType.Double: 121case DbType.Guid: 125case DbType.Int16: 129case DbType.Int32: 133case DbType.Int64: 137case DbType.Single: 141case DbType.SByte: 145case DbType.VarNumeric:
System\Data\EntityClient\EntityCommand.cs (1)
831if (parameter.EdmType == null && parameter.DbType == DbType.Object && (parameter.Value == null || parameter.Value is DBNull))
System\Data\EntityClient\EntityParameter.cs (23)
24private DbType? _dbType; 42public EntityParameter(string parameterName, DbType dbType) 55public EntityParameter(string parameterName, DbType dbType, int size) 70public EntityParameter(string parameterName, DbType dbType, int size, string sourceColumn) 93DbType dbType, 151public override DbType DbType 169return DbType.String; 182return (DbType)this._dbType; 267DbType oldDbType = DbType.String; 274DbType newDbType = DbType.String; 445if (this.DbType == DbType.Object && 476DbType dbType = GetDbTypeFromEdm(_edmType); 477if (dbType == DbType.String) 481return _dbType == DbType.String || _dbType == DbType.AnsiString 482|| dbType == DbType.AnsiStringFixedLength || dbType == DbType.StringFixedLength; 494private static DbType GetDbTypeFromEdm(EdmType edmType) 497DbType dbType; 500return DbType.Object; 509return default(DbType);
System\Data\EntityClient\EntityParameterCollection.cs (2)
124public EntityParameter Add(string parameterName, DbType dbType) 136public EntityParameter Add(string parameterName, DbType dbType, int size)
System\Data\Metadata\TypeHelpers.cs (23)
698internal static DbType ConvertClrTypeToDbType(Type clrType) 708return DbType.Binary; 713return DbType.String; 717return DbType.Guid; 721return DbType.Time; 725return DbType.DateTimeOffset; 728return DbType.Object; 731return DbType.Object; 733return DbType.Boolean; 735return DbType.SByte; 737return DbType.Byte; 740return DbType.String; 742return DbType.Int16; 744return DbType.UInt16; 746return DbType.Int32; 748return DbType.UInt32; 750return DbType.Int64; 752return DbType.UInt64; 754return DbType.Single; 756return DbType.Double; 758return DbType.Decimal; 760return DbType.DateTime; 762return DbType.String;
System.Data.Entity.Design (1)
System\Data\Entity\Design\EntityCodeGenerator.cs (1)
560typeof(System.Data.DbType).Assembly.Location, // System.Data.dll
System.Web (76)
UI\WebControls\ControlParameter.cs (1)
53public ControlParameter(string name, DbType dbType, string controlID, string propertyName)
UI\WebControls\CookieParameter.cs (1)
42public CookieParameter(string name, DbType dbType, string cookieName)
UI\WebControls\FormParameter.cs (1)
43public FormParameter(string name, DbType dbType, string formField)
UI\WebControls\Parameter.cs (64)
50public Parameter(string name, DbType dbType) { 59public Parameter(string name, DbType dbType, string defaultValue) { 115DefaultValue(DbType.Object), 119public DbType DbType { 123return DbType.Object; 124return (DbType)o; 127if (value < DbType.AnsiString || value > DbType.DateTimeOffset) { 219public DbType GetDatabaseType() { 220DbType dbType = DbType; 221if (dbType == DbType.Object) { 231DbType dbType = DbType; 232if (dbType == DbType.Object) { 241internal static object GetValue(object value, string defaultValue, DbType dbType, bool convertEmptyStringToNull, 245if ((dbType != DbType.DateTimeOffset) && (dbType != DbType.Time) && (dbType != DbType.Guid)) { 261if (dbType == DbType.DateTimeOffset) { 267else if (dbType == DbType.Time) { 273else if (dbType == DbType.Guid) { 439public static TypeCode ConvertDbTypeToTypeCode(DbType dbType) { 441case DbType.AnsiString: 442case DbType.AnsiStringFixedLength: 443case DbType.String: 444case DbType.StringFixedLength: 446case DbType.Boolean: 448case DbType.Byte: 450case DbType.VarNumeric: // ??? 451case DbType.Currency: 452case DbType.Decimal: 454case DbType.Date: 455case DbType.DateTime: 456case DbType.DateTime2: // new Katmai type 457case DbType.Time: // new Katmai type - no TypeCode for TimeSpan 459case DbType.Double: 461case DbType.Int16: 463case DbType.Int32: 465case DbType.Int64: 467case DbType.SByte: 469case DbType.Single: 471case DbType.UInt16: 473case DbType.UInt32: 475case DbType.UInt64: 477case DbType.Guid: // ??? 478case DbType.Binary: 479case DbType.Object: 480case DbType.DateTimeOffset: // new Katmai type - no TypeCode for DateTimeOffset 487public static DbType ConvertTypeCodeToDbType(TypeCode typeCode) { 491return DbType.Boolean; 493return DbType.Byte; 495return DbType.StringFixedLength; // ??? 497return DbType.DateTime; 499return DbType.Decimal; 501return DbType.Double; 503return DbType.Int16; 505return DbType.Int32; 507return DbType.Int64; 509return DbType.SByte; 511return DbType.Single; 513return DbType.String; 515return DbType.UInt16; 517return DbType.UInt32; 519return DbType.UInt64; 524return DbType.Object;
UI\WebControls\ParameterCollection.cs (1)
115public int Add(string name, DbType dbType, string value) {
UI\WebControls\ProfileParameter.cs (1)
51public ProfileParameter(string name, DbType dbType, string propertyName)
UI\WebControls\QueryStringParameter.cs (1)
43public QueryStringParameter(string name, DbType dbType, string queryStringField)
UI\WebControls\RouteParameter.cs (1)
40public RouteParameter(string name, DbType dbType, string routeKey)
UI\WebControls\SessionParameter.cs (1)
43public SessionParameter(string name, DbType dbType, string sessionField)
UI\WebControls\SqlDataSourceView.cs (4)
1212if (parameter.DbType != DbType.Object || (parameter.Type != TypeCode.Empty && parameter.Type != TypeCode.DBNull)) { 1223DbType dbType = parameter.GetDatabaseType(); 1225case DbType.Time: 1228case DbType.Date:
System.Web.DynamicData (1)
DynamicData\DataSourceUtil.cs (1)
63parameter.DbType = DbType.Guid;
System.Web.Entity (35)
System\Data\WebControls\EntityDataSourceUtil.cs (27)
383internal static Type ConvertDbTypeToType(DbType dbType) 387case DbType.AnsiString: 388case DbType.AnsiStringFixedLength: 389case DbType.String: 390case DbType.StringFixedLength: 392case DbType.Boolean: 394case DbType.Byte: 396case DbType.VarNumeric: // 397case DbType.Currency: 398case DbType.Decimal: 400case DbType.Date: 401case DbType.DateTime: 402case DbType.DateTime2: // new Katmai type 404case DbType.Time: // new Katmai type 406case DbType.Double: 408case DbType.Int16: 410case DbType.Int32: 412case DbType.Int64: 414case DbType.SByte: 416case DbType.Single: 418case DbType.UInt16: 420case DbType.UInt32: 422case DbType.UInt64: 424case DbType.Guid: 426case DbType.DateTimeOffset: // new Katmai type 428case DbType.Binary: 430case DbType.Object:
System\Data\WebControls\WebControlParameterProxy.cs (8)
85internal DbType DbType 93return DbType.Object; 100Debug.Assert(this.TypeCode != TypeCode.Empty || this.DbType != DbType.Object, "Need to have TypeCode or DbType to get a ClrType"); 119if (this.DbType == DbType.DateTimeOffset) 126else if (this.DbType == DbType.Time) 133else if (this.DbType == DbType.Guid) 151if (parameter != null && parameter.Type == TypeCode.Empty && parameter.DbType == DbType.Object) 156if (parameter != null && parameter.DbType != DbType.Object && parameter.Type != TypeCode.Empty)
System.Workflow.Runtime (23)
Hosting\DbResourceAllocator.cs (4)
244internal DbParameter NewDbParameter(string parameterName, DbType type) 248if (type == DbType.Int64) 256if (type == DbType.Int64) 263internal DbParameter NewDbParameter(string parameterName, DbType type, ParameterDirection direction)
Hosting\SqlWorkflowPersistenceService.cs (7)
187p1.DbType = DbType.Int32; 194p2.DbType = DbType.Guid; 311p2.DbType = DbType.Guid; 319found.DbType = DbType.Boolean; 427p1.DbType = DbType.Int32; 434p2.DbType = DbType.Guid; 495p1.DbType = DbType.Int32;
Tracking\SqlTrackingService.cs (12)
375param.DbType = DbType.DateTime; 1301command.Parameters.Add(DbResourceAllocator.NewDbParameter("@WorkflowId", DbType.Int32, System.Data.ParameterDirection.Output)); 1302command.Parameters.Add(DbResourceAllocator.NewDbParameter("@Exists", DbType.Boolean, System.Data.ParameterDirection.Output)); 1443command.Parameters.Add(DbResourceAllocator.NewDbParameter("@WorkflowInstanceEventId1", DbType.Int64, ParameterDirection.Output)); 1465command.Parameters.Add(DbResourceAllocator.NewDbParameter("@WorkflowInstanceEventId2", DbType.Int64, ParameterDirection.Output)); 1544DbParameter param = DbResourceAllocator.NewDbParameter("@WorkflowInstanceInternalId", DbType.Int64, System.Data.ParameterDirection.InputOutput); 1623DbParameter param = DbResourceAllocator.NewDbParameter("@ActivityInstanceId" + paramIdString, DbType.Int64, System.Data.ParameterDirection.InputOutput); 1635command.Parameters.Add(DbResourceAllocator.NewDbParameter("@ActivityExecutionStatusEventId" + paramIdString, DbType.Int64, ParameterDirection.Output)); 1738DbParameter param = DbResourceAllocator.NewDbParameter("@WorkflowInstanceInternalId", DbType.Int64); 1745param = DbResourceAllocator.NewDbParameter("@ActivityInstanceId", DbType.Int64, System.Data.ParameterDirection.InputOutput); 1786command.Parameters.Add(DbResourceAllocator.NewDbParameter("@UserEventId", DbType.Int64, ParameterDirection.Output)); 1859command.Parameters.Add(DbResourceAllocator.NewDbParameter("@TrackingDataItemId" + index, DbType.Int64, System.Data.ParameterDirection.Output));