The IBM.Data.DB2Types namespace provides classes and structures that represent DB2 data types for the .NET Framework Data Provider.
The following table shows mappings between DB2Type data types, DB2 data types, Informix data types, Microsoft .NET Framework types, and DB2Types classes and structures.
Category | DB2Types Classes and Structures | DB2Type Data Type | DB2 Data Type | Informix Data Type | .NET Data Type |
---|---|---|---|---|---|
Numeric | DB2Int16 | SmallInt | SMALLINT | BOOLEAN, SMALLINT | Int16 |
DB2Int32 | Integer | INT | INTEGER, INT, SERIAL | Int32 | |
DB2Int64 | BigInt, BigSerial | BIGINT | BIGINT, BIGSERIAL, INT8, SERIAL8 | Int64 | |
DB2Real, DB2Real370 | Real | REAL | REAL, SMALLFLOAT | Single | |
DB2Double | Double | DOUBLE PRECISION | DECIMAL (≤31), DOUBLE PRECISION | Double | |
DB2Double | Float | FLOAT | DECIMAL (32), FLOAT | Double | |
DB2Decimal | Decimal | DECIMAL | MONEY | Decimal | |
DB2DecimalFloat | DecimalFloat | DECFLOAT(16|34)41 | Decimal | ||
DB2Decimal | Numeric | DECIMAL | DECIMAL (≤31), NUMERIC | Decimal | |
Date/Time | DB2Date | Date | DATE | DATETIME (date precision) | Datetime |
DB2Time | Time | TIME | DATETIME (time precision) | TimeSpan | |
DB2TimeStamp | Timestamp | TIMESTAMP | DATETIME (time and date precision) | DateTime | |
DB2TimeStampOffset | TimestampWithTimeZone | TIMESTAMP WITH TIME ZONE | N/A | DateTimeOffset | |
XML | DB2Xml | Xml2 | XML | Byte[] | |
Character data | DB2String | Char | CHAR | CHAR | String |
DB2String | VarChar | VARCHAR | VARCHAR | String | |
DB2String | LongVarChar1 | LONG VARCHAR | LVARCHAR | String | |
Binary data | DB2Binary | Binary | CHAR FOR BIT DATA | Byte[] | |
DB2Binary | Binary3 | BINARY | Byte[] | ||
DB2Binary | VarBinary3 | VARBINARY | Byte[] | ||
DB2Binary | LongVarBinary1 | LONG VARCHAR FOR BIT DATA | Byte[] | ||
Graphic data | DB2String | Graphic | GRAPHIC | String | |
DB2String | VarGraphic | VARGRAPHIC | String | ||
DB2String | LongVarGraphic1 | LONG VARGRAPHIC | String | ||
LOB data | DB2Clob | Clob | CLOB | CLOB, TEXT | String |
DB2Blob | Blob | BLOB | BLOB, BYTE | Byte[] | |
DB2Clob | DbClob | DBCLOB | String | ||
Row ID | DB2RowId | RowId | ROWID | Byte[] |
Enumeration | Description |
---|---|
DB2RoundingMode | Specify the rounding mode to use with DB2DecimalFloat objects. |