167 references to SQL_TYPE
System.Data (167)
fx\src\data\System\Data\Odbc\DbDataRecord.cs (2)
24internal ODBC32.SQL_TYPE? _dbtype; 34internal ODBC32.SQL_TYPE _sql_type; // need that to properly marshal the value
fx\src\data\System\Data\Odbc\Odbc32.cs (60)
31static internal Exception UnknownSQLType(ODBC32.SQL_TYPE sqltype) { 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); 809internal readonly ODBC32.SQL_TYPE _sql_type; 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) { 936static internal TypeMap FromSqlType(ODBC32.SQL_TYPE sqltype) { 938case ODBC32.SQL_TYPE.CHAR: return _Char; 939case ODBC32.SQL_TYPE.VARCHAR: return _VarChar; 940case ODBC32.SQL_TYPE.LONGVARCHAR: return _Text; 941case ODBC32.SQL_TYPE.WCHAR: return _NChar; 942case ODBC32.SQL_TYPE.WVARCHAR: return _NVarChar; 943case ODBC32.SQL_TYPE.WLONGVARCHAR: return _NText; 944case ODBC32.SQL_TYPE.DECIMAL: return _Decimal; 945case ODBC32.SQL_TYPE.NUMERIC: return _Numeric; 946case ODBC32.SQL_TYPE.SMALLINT: return _SmallInt; 947case ODBC32.SQL_TYPE.INTEGER: return _Int; 948case ODBC32.SQL_TYPE.REAL: return _Real; 949case ODBC32.SQL_TYPE.FLOAT: return _Double; 950case ODBC32.SQL_TYPE.DOUBLE: return _Double; 951case ODBC32.SQL_TYPE.BIT: return _Bit; 952case ODBC32.SQL_TYPE.TINYINT: return _TinyInt; 953case ODBC32.SQL_TYPE.BIGINT: return _BigInt; 954case ODBC32.SQL_TYPE.BINARY: return _Binary; 955case ODBC32.SQL_TYPE.VARBINARY: return _VarBinary; 956case ODBC32.SQL_TYPE.LONGVARBINARY: return _Image; 957case ODBC32.SQL_TYPE.TYPE_DATE: return _Date; 958case ODBC32.SQL_TYPE.TYPE_TIME: return _Time; 959case ODBC32.SQL_TYPE.TIMESTAMP: 960case ODBC32.SQL_TYPE.TYPE_TIMESTAMP: return _DateTime; 961case ODBC32.SQL_TYPE.GUID: return _UniqueId; 962case ODBC32.SQL_TYPE.SS_VARIANT: return _Variant; 963case ODBC32.SQL_TYPE.SS_UDT: return _UDT; 964case ODBC32.SQL_TYPE.SS_XML: return _XML; 966case ODBC32.SQL_TYPE.SS_UTCDATETIME: 967case ODBC32.SQL_TYPE.SS_TIME_EX:
fx\src\data\System\Data\Odbc\OdbcCommandBuilder.cs (1)
221parameter.OdbcType = TypeMap.FromSqlType((ODBC32.SQL_TYPE)reader.GetInt16(ODBC32.DATA_TYPE-1))._odbcType;
fx\src\data\System\Data\Odbc\OdbcConnection.cs (16)
574internal void SetSupportedType (ODBC32.SQL_TYPE sqltype) { 578case ODBC32.SQL_TYPE.NUMERIC: { 582case ODBC32.SQL_TYPE.WCHAR: { 586case ODBC32.SQL_TYPE.WVARCHAR: { 590case ODBC32.SQL_TYPE.WLONGVARCHAR: { 602internal void FlagRestrictedSqlBindType(ODBC32.SQL_TYPE sqltype) { 606case ODBC32.SQL_TYPE.NUMERIC: { 610case ODBC32.SQL_TYPE.DECIMAL: { 700internal bool TestTypeSupport (ODBC32.SQL_TYPE sqltype){ 707case ODBC32.SQL_TYPE.NUMERIC: { 712case ODBC32.SQL_TYPE.WCHAR: { 717case ODBC32.SQL_TYPE.WVARCHAR: { 722case ODBC32.SQL_TYPE.WLONGVARCHAR: { 748internal bool TestRestrictedSqlBindType (ODBC32.SQL_TYPE sqltype){ 751case ODBC32.SQL_TYPE.NUMERIC: { 755case ODBC32.SQL_TYPE.DECIMAL: {
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (34)
410case ODBC32.SQL_TYPE.CHAR: 411case ODBC32.SQL_TYPE.VARCHAR: 412case ODBC32.SQL_TYPE.LONGVARCHAR: 413case ODBC32.SQL_TYPE.WCHAR: 414case ODBC32.SQL_TYPE.WVARCHAR: 415case ODBC32.SQL_TYPE.WLONGVARCHAR: 418case ODBC32.SQL_TYPE.DECIMAL: 419case ODBC32.SQL_TYPE.NUMERIC: 422case ODBC32.SQL_TYPE.SMALLINT: 425case ODBC32.SQL_TYPE.INTEGER: 428case ODBC32.SQL_TYPE.REAL: 431case ODBC32.SQL_TYPE.FLOAT: 432case ODBC32.SQL_TYPE.DOUBLE: 435case ODBC32.SQL_TYPE.BIT: 438case ODBC32.SQL_TYPE.TINYINT: 441case ODBC32.SQL_TYPE.BIGINT: 444case ODBC32.SQL_TYPE.BINARY: 445case ODBC32.SQL_TYPE.VARBINARY: 446case ODBC32.SQL_TYPE.LONGVARBINARY: 449case ODBC32.SQL_TYPE.TYPE_DATE: 452case ODBC32.SQL_TYPE.TYPE_TIME: 456case ODBC32.SQL_TYPE.TYPE_TIMESTAMP: 459case ODBC32.SQL_TYPE.GUID: 462case ODBC32.SQL_TYPE.SS_VARIANT: 476ODBC32.SQL_TYPE subtype = (ODBC32.SQL_TYPE)(int)GetColAttribute(i, (ODBC32.SQL_DESC)ODBC32.SQL_CA_SS.VARIANT_SQL_TYPE, (ODBC32.SQL_COLUMN)(-1), ODBC32.HANDLER.THROW); 519info._dbtype = unchecked((ODBC32.SQL_TYPE)(int)GetColAttribute(i, ODBC32.SQL_DESC.CONCISE_TYPE, ODBC32.SQL_COLUMN.TYPE,ODBC32.HANDLER.THROW)); 1785typeMap = TypeMap.FromSqlType((ODBC32.SQL_TYPE)unchecked((int) GetColAttribute(i, ODBC32.SQL_DESC.CONCISE_TYPE, ODBC32.SQL_COLUMN.TYPE, ODBC32.HANDLER.THROW))); 1798case ODBC32.SQL_TYPE.WCHAR: 1799case ODBC32.SQL_TYPE.WLONGVARCHAR: 1800case ODBC32.SQL_TYPE.WVARCHAR: 1815case ODBC32.SQL_TYPE.LONGVARCHAR: 1816case ODBC32.SQL_TYPE.WLONGVARCHAR: 1817case ODBC32.SQL_TYPE.LONGVARBINARY:
fx\src\data\System\Data\Odbc\odbcmetadatafactory.cs (33)
242ODBC32.SQL_TYPE sqlType; 247sqlType = (ODBC32.SQL_TYPE)(Int32) Convert.ChangeType(getTypeInfoValues[indexDATA_TYPE], 254sqlType = ODBC32.SQL_TYPE.TYPE_DATE; 257sqlType = ODBC32.SQL_TYPE.TYPE_TIME; 280case ODBC32.SQL_TYPE.LONGVARCHAR: 281case ODBC32.SQL_TYPE.WLONGVARCHAR: 282case ODBC32.SQL_TYPE.LONGVARBINARY: 283case ODBC32.SQL_TYPE.SS_XML: 288case ODBC32.SQL_TYPE.VARCHAR: 289case ODBC32.SQL_TYPE.WVARCHAR: 290case ODBC32.SQL_TYPE.VARBINARY: 295case ODBC32.SQL_TYPE.CHAR: 296case ODBC32.SQL_TYPE.WCHAR: 297case ODBC32.SQL_TYPE.DECIMAL: 298case ODBC32.SQL_TYPE.NUMERIC: 299case ODBC32.SQL_TYPE.SMALLINT: 300case ODBC32.SQL_TYPE.INTEGER: 301case ODBC32.SQL_TYPE.REAL: 302case ODBC32.SQL_TYPE.FLOAT: 303case ODBC32.SQL_TYPE.DOUBLE: 304case ODBC32.SQL_TYPE.BIT: 305case ODBC32.SQL_TYPE.TINYINT: 306case ODBC32.SQL_TYPE.BIGINT: 307case ODBC32.SQL_TYPE.TYPE_DATE: 308case ODBC32.SQL_TYPE.TYPE_TIME: 309case ODBC32.SQL_TYPE.TIMESTAMP: 310case ODBC32.SQL_TYPE.TYPE_TIMESTAMP: 311case ODBC32.SQL_TYPE.GUID: 312case ODBC32.SQL_TYPE.SS_VARIANT: 313case ODBC32.SQL_TYPE.SS_UTCDATETIME: 314case ODBC32.SQL_TYPE.SS_TIME_EX: 315case ODBC32.SQL_TYPE.BINARY: 320case ODBC32.SQL_TYPE.SS_UDT:
fx\src\data\System\Data\Odbc\OdbcParameter.cs (20)
58private ODBC32.SQL_TYPE _boundParameterType; // if we bound already that is the type we used 335if ((ODBC32.SQL_TYPE.CHAR == _bindtype._sql_type) 336|| (ODBC32.SQL_TYPE.VARCHAR == _bindtype._sql_type) 337|| (ODBC32.SQL_TYPE.LONGVARCHAR == _bindtype._sql_type)) { 347if ((ODBC32.SQL_TYPE.CHAR == _bindtype._sql_type) 348|| (ODBC32.SQL_TYPE.VARCHAR == _bindtype._sql_type) 349|| (ODBC32.SQL_TYPE.LONGVARCHAR == _bindtype._sql_type)) { 586case ODBC32.SQL_TYPE.DECIMAL: 587case ODBC32.SQL_TYPE.NUMERIC: 590|| !command.Connection.TestTypeSupport(ODBC32.SQL_TYPE.NUMERIC) // otherwise we convert if the driver does not support numeric 603case ODBC32.SQL_TYPE.BIGINT: 615case ODBC32.SQL_TYPE.WCHAR: // MDAC 68993 616case ODBC32.SQL_TYPE.WVARCHAR: 617case ODBC32.SQL_TYPE.WLONGVARCHAR: 626if (ODBC32.SQL_TYPE.WCHAR == _bindtype._sql_type) { _bindtype = TypeMap._Char; } 627else if (ODBC32.SQL_TYPE.WVARCHAR == _bindtype._sql_type) { _bindtype = TypeMap._VarChar; } 628else if (ODBC32.SQL_TYPE.WLONGVARCHAR == _bindtype._sql_type) { 660case ODBC32.SQL_TYPE.VARBINARY: 666case ODBC32.SQL_TYPE.VARCHAR: 672case ODBC32.SQL_TYPE.WVARCHAR:
fx\src\data\System\Data\Odbc\OdbcStatementHandle.cs (1)
86internal ODBC32.RetCode BindParameter(short ordinal, short parameterDirection, ODBC32.SQL_C sqlctype, ODBC32.SQL_TYPE sqltype, IntPtr cchSize, IntPtr scale, HandleRef buffer, IntPtr bufferLength, HandleRef intbuffer) {