166 references to SQL_TYPE
System.Data.Odbc (166)
System\Data\Odbc\DbDataRecord.cs (1)
15
internal ODBC32.
SQL_TYPE
? _dbtype;
System\Data\Odbc\Odbc32.cs (60)
23
internal static Exception UnknownSQLType(ODBC32.
SQL_TYPE
sqltype)
766
private static readonly TypeMap s_bigInt = new TypeMap(OdbcType.BigInt, DbType.Int64, typeof(long), ODBC32.
SQL_TYPE
.BIGINT, ODBC32.SQL_C.SBIGINT, ODBC32.SQL_C.SBIGINT, 8, 20, true);
767
private static readonly TypeMap s_binary = new TypeMap(OdbcType.Binary, DbType.Binary, typeof(byte[]), ODBC32.
SQL_TYPE
.BINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false);
768
private static readonly TypeMap s_bit = new TypeMap(OdbcType.Bit, DbType.Boolean, typeof(bool), ODBC32.
SQL_TYPE
.BIT, ODBC32.SQL_C.BIT, ODBC32.SQL_C.BIT, 1, 1, false);
769
internal static 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);
770
private static readonly TypeMap s_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);
771
private static readonly TypeMap s_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);
772
private static readonly TypeMap s_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);
773
private static readonly TypeMap s_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);
775
private static readonly TypeMap s_double = new TypeMap(OdbcType.Double, DbType.Double, typeof(double), ODBC32.
SQL_TYPE
.DOUBLE, ODBC32.SQL_C.DOUBLE, ODBC32.SQL_C.DOUBLE, 8, 15, false);
776
internal static 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);
777
private static readonly TypeMap s_int = new TypeMap(OdbcType.Int, DbType.Int32, typeof(int), ODBC32.
SQL_TYPE
.INTEGER, ODBC32.SQL_C.SLONG, ODBC32.SQL_C.SLONG, 4, 10, true);
778
private static readonly TypeMap s_NChar = new TypeMap(OdbcType.NChar, DbType.StringFixedLength, typeof(string), ODBC32.
SQL_TYPE
.WCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.WCHAR, -1, -1, false);
779
internal static 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);
780
private static readonly TypeMap s_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);
781
internal static 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);
782
private static readonly TypeMap s_real = new TypeMap(OdbcType.Real, DbType.Single, typeof(float), ODBC32.
SQL_TYPE
.REAL, ODBC32.SQL_C.REAL, ODBC32.SQL_C.REAL, 4, 7, false);
783
private static readonly TypeMap s_uniqueId = new TypeMap(OdbcType.UniqueIdentifier, DbType.Guid, typeof(Guid), ODBC32.
SQL_TYPE
.GUID, ODBC32.SQL_C.GUID, ODBC32.SQL_C.GUID, 16, 36, false);
784
private static readonly TypeMap s_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);
785
private static readonly TypeMap s_smallInt = new TypeMap(OdbcType.SmallInt, DbType.Int16, typeof(short), ODBC32.
SQL_TYPE
.SMALLINT, ODBC32.SQL_C.SSHORT, ODBC32.SQL_C.SSHORT, 2, 5, true);
786
internal static 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);
787
private static readonly TypeMap s_timestamp = new TypeMap(OdbcType.Timestamp, DbType.Binary, typeof(byte[]), ODBC32.
SQL_TYPE
.BINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false);
788
private static readonly TypeMap s_tinyInt = new TypeMap(OdbcType.TinyInt, DbType.Byte, typeof(byte), ODBC32.
SQL_TYPE
.TINYINT, ODBC32.SQL_C.UTINYINT, ODBC32.SQL_C.UTINYINT, 1, 3, true);
789
private static readonly TypeMap s_varBinary = new TypeMap(OdbcType.VarBinary, DbType.Binary, typeof(byte[]), ODBC32.
SQL_TYPE
.VARBINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false);
790
internal static 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);
791
private static readonly TypeMap s_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);
792
private static readonly TypeMap s_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);
793
private static readonly TypeMap s_XML = new TypeMap(OdbcType.Text, DbType.AnsiString, typeof(string), ODBC32.
SQL_TYPE
.LONGVARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.CHAR, -1, -1, false);
799
internal readonly ODBC32.
SQL_TYPE
_sql_type;
808
private 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)
935
internal static TypeMap FromSqlType(ODBC32.
SQL_TYPE
sqltype)
939
case ODBC32.
SQL_TYPE
.CHAR: return _Char;
940
case ODBC32.
SQL_TYPE
.VARCHAR: return _VarChar;
941
case ODBC32.
SQL_TYPE
.LONGVARCHAR: return _Text;
942
case ODBC32.
SQL_TYPE
.WCHAR: return s_NChar;
943
case ODBC32.
SQL_TYPE
.WVARCHAR: return _NVarChar;
944
case ODBC32.
SQL_TYPE
.WLONGVARCHAR: return _NText;
945
case ODBC32.
SQL_TYPE
.DECIMAL: return s_decimal;
946
case ODBC32.
SQL_TYPE
.NUMERIC: return s_numeric;
947
case ODBC32.
SQL_TYPE
.SMALLINT: return s_smallInt;
948
case ODBC32.
SQL_TYPE
.INTEGER: return s_int;
949
case ODBC32.
SQL_TYPE
.REAL: return s_real;
950
case ODBC32.
SQL_TYPE
.FLOAT: return s_double;
951
case ODBC32.
SQL_TYPE
.DOUBLE: return s_double;
952
case ODBC32.
SQL_TYPE
.BIT: return s_bit;
953
case ODBC32.
SQL_TYPE
.TINYINT: return s_tinyInt;
954
case ODBC32.
SQL_TYPE
.BIGINT: return s_bigInt;
955
case ODBC32.
SQL_TYPE
.BINARY: return s_binary;
956
case ODBC32.
SQL_TYPE
.VARBINARY: return s_varBinary;
957
case ODBC32.
SQL_TYPE
.LONGVARBINARY: return _Image;
958
case ODBC32.
SQL_TYPE
.TYPE_DATE: return s_date;
959
case ODBC32.
SQL_TYPE
.TYPE_TIME: return s_time;
960
case ODBC32.
SQL_TYPE
.TIMESTAMP:
961
case ODBC32.
SQL_TYPE
.TYPE_TIMESTAMP: return s_dateTime;
962
case ODBC32.
SQL_TYPE
.GUID: return s_uniqueId;
963
case ODBC32.
SQL_TYPE
.SS_VARIANT: return s_variant;
964
case ODBC32.
SQL_TYPE
.SS_UDT: return s_UDT;
965
case ODBC32.
SQL_TYPE
.SS_XML: return s_XML;
967
case ODBC32.
SQL_TYPE
.SS_UTCDATETIME:
968
case ODBC32.
SQL_TYPE
.SS_TIME_EX:
System\Data\Odbc\OdbcCommandBuilder.cs (1)
232
parameter.OdbcType = TypeMap.FromSqlType((ODBC32.
SQL_TYPE
)reader.GetInt16(ODBC32.DATA_TYPE - 1))._odbcType;
System\Data\Odbc\OdbcConnection.cs (16)
656
internal void SetSupportedType(ODBC32.
SQL_TYPE
sqltype)
662
case ODBC32.
SQL_TYPE
.NUMERIC:
667
case ODBC32.
SQL_TYPE
.WCHAR:
672
case ODBC32.
SQL_TYPE
.WVARCHAR:
677
case ODBC32.
SQL_TYPE
.WLONGVARCHAR:
690
internal void FlagRestrictedSqlBindType(ODBC32.
SQL_TYPE
sqltype)
696
case ODBC32.
SQL_TYPE
.NUMERIC:
701
case ODBC32.
SQL_TYPE
.DECIMAL:
805
internal bool TestTypeSupport(ODBC32.
SQL_TYPE
sqltype)
814
case ODBC32.
SQL_TYPE
.NUMERIC:
820
case ODBC32.
SQL_TYPE
.WCHAR:
826
case ODBC32.
SQL_TYPE
.WVARCHAR:
832
case ODBC32.
SQL_TYPE
.WLONGVARCHAR:
860
internal bool TestRestrictedSqlBindType(ODBC32.
SQL_TYPE
sqltype)
865
case ODBC32.
SQL_TYPE
.NUMERIC:
870
case ODBC32.
SQL_TYPE
.DECIMAL:
System\Data\Odbc\OdbcDataReader.cs (34)
470
case ODBC32.
SQL_TYPE
.CHAR:
471
case ODBC32.
SQL_TYPE
.VARCHAR:
472
case ODBC32.
SQL_TYPE
.LONGVARCHAR:
473
case ODBC32.
SQL_TYPE
.WCHAR:
474
case ODBC32.
SQL_TYPE
.WVARCHAR:
475
case ODBC32.
SQL_TYPE
.WLONGVARCHAR:
478
case ODBC32.
SQL_TYPE
.DECIMAL:
479
case ODBC32.
SQL_TYPE
.NUMERIC:
482
case ODBC32.
SQL_TYPE
.SMALLINT:
485
case ODBC32.
SQL_TYPE
.INTEGER:
488
case ODBC32.
SQL_TYPE
.REAL:
491
case ODBC32.
SQL_TYPE
.FLOAT:
492
case ODBC32.
SQL_TYPE
.DOUBLE:
495
case ODBC32.
SQL_TYPE
.BIT:
498
case ODBC32.
SQL_TYPE
.TINYINT:
501
case ODBC32.
SQL_TYPE
.BIGINT:
504
case ODBC32.
SQL_TYPE
.BINARY:
505
case ODBC32.
SQL_TYPE
.VARBINARY:
506
case ODBC32.
SQL_TYPE
.LONGVARBINARY:
509
case ODBC32.
SQL_TYPE
.TYPE_DATE:
512
case ODBC32.
SQL_TYPE
.TYPE_TIME:
516
case ODBC32.
SQL_TYPE
.TYPE_TIMESTAMP:
519
case ODBC32.
SQL_TYPE
.GUID:
522
case ODBC32.
SQL_TYPE
.SS_VARIANT:
538
ODBC32.
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);
589
info._dbtype = unchecked((ODBC32.
SQL_TYPE
)(int)GetColAttribute(i, ODBC32.SQL_DESC.CONCISE_TYPE, ODBC32.SQL_COLUMN.TYPE, ODBC32.HANDLER.THROW));
2026
typeMap = TypeMap.FromSqlType((ODBC32.
SQL_TYPE
)unchecked((int)GetColAttribute(i, ODBC32.SQL_DESC.CONCISE_TYPE, ODBC32.SQL_COLUMN.TYPE, ODBC32.HANDLER.THROW)));
2041
case ODBC32.
SQL_TYPE
.WCHAR:
2042
case ODBC32.
SQL_TYPE
.WLONGVARCHAR:
2043
case ODBC32.
SQL_TYPE
.WVARCHAR:
2059
case ODBC32.
SQL_TYPE
.LONGVARCHAR:
2060
case ODBC32.
SQL_TYPE
.WLONGVARCHAR:
2061
case ODBC32.
SQL_TYPE
.LONGVARBINARY:
System\Data\Odbc\OdbcMetaDataFactory.cs (33)
246
ODBC32.
SQL_TYPE
sqlType;
251
sqlType = (ODBC32.
SQL_TYPE
)(int)Convert.ChangeType(getTypeInfoValues[indexDATA_TYPE], typeof(int), null);
258
sqlType = ODBC32.
SQL_TYPE
.TYPE_DATE;
262
sqlType = ODBC32.
SQL_TYPE
.TYPE_TIME;
288
case ODBC32.
SQL_TYPE
.LONGVARCHAR:
289
case ODBC32.
SQL_TYPE
.WLONGVARCHAR:
290
case ODBC32.
SQL_TYPE
.LONGVARBINARY:
291
case ODBC32.
SQL_TYPE
.SS_XML:
296
case ODBC32.
SQL_TYPE
.VARCHAR:
297
case ODBC32.
SQL_TYPE
.WVARCHAR:
298
case ODBC32.
SQL_TYPE
.VARBINARY:
303
case ODBC32.
SQL_TYPE
.CHAR:
304
case ODBC32.
SQL_TYPE
.WCHAR:
305
case ODBC32.
SQL_TYPE
.DECIMAL:
306
case ODBC32.
SQL_TYPE
.NUMERIC:
307
case ODBC32.
SQL_TYPE
.SMALLINT:
308
case ODBC32.
SQL_TYPE
.INTEGER:
309
case ODBC32.
SQL_TYPE
.REAL:
310
case ODBC32.
SQL_TYPE
.FLOAT:
311
case ODBC32.
SQL_TYPE
.DOUBLE:
312
case ODBC32.
SQL_TYPE
.BIT:
313
case ODBC32.
SQL_TYPE
.TINYINT:
314
case ODBC32.
SQL_TYPE
.BIGINT:
315
case ODBC32.
SQL_TYPE
.TYPE_DATE:
316
case ODBC32.
SQL_TYPE
.TYPE_TIME:
317
case ODBC32.
SQL_TYPE
.TIMESTAMP:
318
case ODBC32.
SQL_TYPE
.TYPE_TIMESTAMP:
319
case ODBC32.
SQL_TYPE
.GUID:
320
case ODBC32.
SQL_TYPE
.SS_VARIANT:
321
case ODBC32.
SQL_TYPE
.SS_UTCDATETIME:
322
case ODBC32.
SQL_TYPE
.SS_TIME_EX:
323
case ODBC32.
SQL_TYPE
.BINARY:
328
case ODBC32.
SQL_TYPE
.SS_UDT:
System\Data\Odbc\OdbcParameter.cs (20)
46
private ODBC32.
SQL_TYPE
_boundParameterType; // if we bound already that is the type we used
366
if ((ODBC32.
SQL_TYPE
.CHAR == _bindtype._sql_type)
367
|| (ODBC32.
SQL_TYPE
.VARCHAR == _bindtype._sql_type)
368
|| (ODBC32.
SQL_TYPE
.LONGVARCHAR == _bindtype._sql_type))
380
if ((ODBC32.
SQL_TYPE
.CHAR == _bindtype._sql_type)
381
|| (ODBC32.
SQL_TYPE
.VARCHAR == _bindtype._sql_type)
382
|| (ODBC32.
SQL_TYPE
.LONGVARCHAR == _bindtype._sql_type))
671
case ODBC32.
SQL_TYPE
.DECIMAL:
672
case ODBC32.
SQL_TYPE
.NUMERIC:
675
|| !command.Connection.TestTypeSupport(ODBC32.
SQL_TYPE
.NUMERIC) // otherwise we convert if the driver does not support numeric
690
case ODBC32.
SQL_TYPE
.BIGINT:
704
case ODBC32.
SQL_TYPE
.WCHAR: // MDAC 68993
705
case ODBC32.
SQL_TYPE
.WVARCHAR:
706
case ODBC32.
SQL_TYPE
.WLONGVARCHAR:
717
if (ODBC32.
SQL_TYPE
.WCHAR == _bindtype._sql_type) { _bindtype = TypeMap._Char; }
718
else if (ODBC32.
SQL_TYPE
.WVARCHAR == _bindtype._sql_type) { _bindtype = TypeMap._VarChar; }
719
else if (ODBC32.
SQL_TYPE
.WLONGVARCHAR == _bindtype._sql_type)
757
case ODBC32.
SQL_TYPE
.VARBINARY:
764
case ODBC32.
SQL_TYPE
.VARCHAR:
771
case ODBC32.
SQL_TYPE
.WVARCHAR:
System\Data\Odbc\OdbcStatementHandle.cs (1)
74
internal ODBC32.SQLRETURN BindParameter(short ordinal, short parameterDirection, ODBC32.SQL_C sqlctype, ODBC32.
SQL_TYPE
sqltype, IntPtr cchSize, IntPtr scale, HandleRef buffer, IntPtr bufferLength, HandleRef intbuffer)