71 references to OdbcType
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
150
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Odbc.
OdbcType
))]
System.Data.Odbc (70)
System\Data\Odbc\Odbc32.cs (57)
108
internal static Exception UnknownOdbcType(
OdbcType
odbctype)
110
return ADP.InvalidEnumerationValue(typeof(
OdbcType
), (int)odbctype);
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);
795
internal readonly
OdbcType
_odbcType;
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)
823
internal static TypeMap FromOdbcType(
OdbcType
odbcType) =>
826
OdbcType
.BigInt => s_bigInt,
827
OdbcType
.Binary => s_binary,
828
OdbcType
.Bit => s_bit,
829
OdbcType
.Char => _Char,
830
OdbcType
.DateTime => s_dateTime,
831
OdbcType
.Date => s_date,
832
OdbcType
.Time => s_time,
833
OdbcType
.Double => s_double,
834
OdbcType
.Decimal => s_decimal,
835
OdbcType
.Image => _Image,
836
OdbcType
.Int => s_int,
837
OdbcType
.NChar => s_NChar,
838
OdbcType
.NText => _NText,
839
OdbcType
.Numeric => s_numeric,
840
OdbcType
.NVarChar => _NVarChar,
841
OdbcType
.Real => s_real,
842
OdbcType
.UniqueIdentifier => s_uniqueId,
843
OdbcType
.SmallDateTime => s_smallDT,
844
OdbcType
.SmallInt => s_smallInt,
845
OdbcType
.Text => _Text,
846
OdbcType
.Timestamp => s_timestamp,
847
OdbcType
.TinyInt => s_tinyInt,
848
OdbcType
.VarBinary => s_varBinary,
849
OdbcType
.VarChar => _VarChar,
882
default: throw ADP.DbTypeNotSupported(dbType, typeof(
OdbcType
));
System\Data\Odbc\OdbcCommandBuilder.cs (3)
84
p.OdbcType = (
OdbcType
)valueType;
236
case
OdbcType
.Decimal:
237
case
OdbcType
.Numeric:
System\Data\Odbc\OdbcParameter.cs (7)
82
public OdbcParameter(string? name,
OdbcType
type) : this()
88
public OdbcParameter(string? name,
OdbcType
type, int size) : this()
95
public OdbcParameter(string? name,
OdbcType
type, int size, string? sourcecolumn) : this()
106
OdbcType
odbcType,
131
OdbcType
odbcType, int size,
176
DefaultValue(
OdbcType
.NChar),
179
public
OdbcType
OdbcType
System\Data\Odbc\OdbcParameterCollection.cs (3)
80
public OdbcParameter Add(string? parameterName,
OdbcType
odbcType)
85
public OdbcParameter Add(string? parameterName,
OdbcType
odbcType, int size)
90
public OdbcParameter Add(string? parameterName,
OdbcType
odbcType, int size, string? sourceColumn)