76 references to OdbcType
System.Data (76)
fx\src\data\System\Data\Odbc\Odbc32.cs (57)
102
static internal Exception UnknownOdbcType(
OdbcType
odbctype) {
103
return ADP.InvalidEnumerationValue(typeof(
OdbcType
), (int) odbctype);
776
static 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);
777
static 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);
778
static 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);
779
static 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);
780
static 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);
781
static 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);
782
static 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);
783
static 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);
785
static 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);
786
static 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);
787
static 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);
788
static 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);
789
static 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);
790
static 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);
791
static 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);
792
static 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);
793
static 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);
794
static 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);
795
static 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);
796
static 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);
797
static 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);
798
static 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);
799
static 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);
800
static 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);
801
static 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);
802
static 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);
803
static 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);
805
internal readonly
OdbcType
_odbcType;
818
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) {
832
static internal TypeMap FromOdbcType(
OdbcType
odbcType) {
834
case
OdbcType
.BigInt: return _BigInt;
835
case
OdbcType
.Binary: return _Binary;
836
case
OdbcType
.Bit: return _Bit;
837
case
OdbcType
.Char: return _Char;
838
case
OdbcType
.DateTime: return _DateTime;
839
case
OdbcType
.Date: return _Date;
840
case
OdbcType
.Time: return _Time;
841
case
OdbcType
.Double: return _Double;
842
case
OdbcType
.Decimal: return _Decimal;
843
case
OdbcType
.Image: return _Image;
844
case
OdbcType
.Int: return _Int;
845
case
OdbcType
.NChar: return _NChar;
846
case
OdbcType
.NText: return _NText;
847
case
OdbcType
.Numeric: return _Numeric;
848
case
OdbcType
.NVarChar: return _NVarChar;
849
case
OdbcType
.Real: return _Real;
850
case
OdbcType
.UniqueIdentifier: return _UniqueId;
851
case
OdbcType
.SmallDateTime: return _SmallDT;
852
case
OdbcType
.SmallInt: return _SmallInt;
853
case
OdbcType
.Text: return _Text;
854
case
OdbcType
.Timestamp: return _Timestamp;
855
case
OdbcType
.TinyInt: return _TinyInt;
856
case
OdbcType
.VarBinary: return _VarBinary;
857
case
OdbcType
.VarChar: return _VarChar;
889
default: throw ADP.DbTypeNotSupported(dbType, typeof(
OdbcType
));
fx\src\data\System\Data\Odbc\OdbcCommandBuilder.cs (3)
88
p.OdbcType = (
OdbcType
) valueType;
224
case
OdbcType
.Decimal:
225
case
OdbcType
.Numeric:
fx\src\data\System\Data\Odbc\OdbcParameter.cs (13)
92
public OdbcParameter(string name,
OdbcType
type) : this() {
97
public OdbcParameter(string name,
OdbcType
type, int size) : this() {
103
public OdbcParameter(string name,
OdbcType
type, int size, string sourcecolumn) : this() {
113
OdbcType
odbcType,
137
OdbcType
odbcType, int size,
175
DefaultValue(
OdbcType
.NChar),
181
public
OdbcType
OdbcType {
1023
if (
OdbcType
.NChar != p.OdbcType) {
1049
ctorParams = new Type[] { typeof(string), typeof(
OdbcType
) };
1054
ctorParams = new Type[] { typeof(string), typeof(
OdbcType
), typeof(int) };
1061
ctorParams = new Type[] { typeof(string), typeof(
OdbcType
), typeof(int), typeof(string) };
1071
typeof(string), typeof(
OdbcType
), typeof(int), typeof(ParameterDirection),
1081
typeof(string), typeof(
OdbcType
), typeof(int), typeof(ParameterDirection),
fx\src\data\System\Data\Odbc\OdbcParameterCollection.cs (3)
81
public OdbcParameter Add(string parameterName,
OdbcType
odbcType) {
85
public OdbcParameter Add(string parameterName,
OdbcType
odbcType, int size) {
89
public OdbcParameter Add(string parameterName,
OdbcType
odbcType, int size, string sourceColumn) {