skip to main content
Developing ADO.NET Applications : Data Types
 

Data Types

The data types and isolation levels supported by the .NET Client depend on the data source to which you are connecting.
Table 29 lists the data types supported by the .NET Client and how they are mapped to the .NET Framework types. You can use the table to infer the data types that will be used when a DataSet is filled using a DataAdapter. This table also identifies the proper accessors for accessing the data when a DataReader object is used directly.
The OpenAccess SDK data type column refers to the native type name.
The OpenAccessDbType column refers to the .NET Client’s type enumeration. Generally, there is a one to one mapping between the native type and the OpenAccessDbType.
The .NET Framework Type column refers to the base data types available in the framework.
The .NET Framework Typed Accessor column refers to the method that must be used to access a column of this type when using a DataReader.
 
Table 29: Mapping of OpenAccess SDK Data Types  
OpenAccess SDK Service Data Type
OpenAccessDbType
.NET Framework Type
.NET Framework Typed Accessor
BINARY
Binary
Byte[]
GetBytes( )
BIT
Bit
Boolean
GetBoolean( )
CHAR
Char
String
GetString( )
GetChars( )
DATE
Date
DateTime
GetDateTime( )
DECIMAL
Decimal
Decimal
GetDecimal( )
DOUBLE
Double
Double
GetDouble( )
FLOAT
Double
Double
GetDouble( )
INTEGER
Int
Int32
GetInt32( )
LONGVARBINARY
LongVarBinary
Byte[]
GetBytes( )
LONGVARCHAR
LongVarChar
String
GetString( )
GetChars( )
NUMERIC
Decimal
Decimal
GetDecimal( )
REAL
Single
Single
GetFloat( )
SMALLINT
SmallInt
Int16
GetInt16( )
TIME
Time
TimeSpan
GetValue( )
TIMESTAMP
TimeStamp
DateTime
GetDateTime( )
TINYINT
Byte
Byte[]
GetByte( )
VARBINARY
VarBinary
Byte[]
GetBytes( )
VARCHAR
VarChar
String
GetString( )
GetChars( )