Specifies the data type of a field, property, or DB2Parameter.
[Visual Basic]
<Serializable>
Public Enum DB2Type
[C#]
[Serializable]
public enum DB2Type
[C++]
[Serializable]
__value public enum DB2Type
[JScript]
public
Serializable
enum DB2Type
The following table lists members of DB2Type enumeration.
Member | Description |
---|---|
BigInt | A 64-bit integer. Represents the BIGINT, BIGSERIAL, INT8, SERIAL8 Informix data types, and the BIGINT DB2 data type. |
BigSerial | A 64-bit integer. Represents the BIGINT, BIGSERIAL, INT8, SERIAL8 Informix data types. |
Binary | An array of bytes. Represents the CHAR, VARCHAR, LONG VARCHAR, GRAPHIC, VARGRAPHIC, and LONG VARGRAPHIC DB2 data types. |
Blob | An array of bytes. Represents the BLOB DB2 data type. |
Byte | An array of bytes. Represents the BLOB DB2 data type. |
Char | A single character. Represents the CHAR DB2 data type. |
Clob | A large string of characters. Represents the CLOB DB2 data type. |
Date | A string that represents a date. Represents the DATE DB2 data type. |
DateTime | A string that represents a date. Represents the DATE DB2 data type. |
DbClob | A large string of characters. Represents the DbCLOB DB2 data type. |
Decimal | A decimal value. Represents the DECIMAL DB2 data type. |
DecimalFloat | A floating decimal value. Represents the DECIMALFLOAT DB2 data type. |
Double | A double-precision floating-point value. Represents the DOUBLE PRECISION DB2 data type. |
Float | A single-precision floating-point value. Represents the FLOAT DB2 data type. |
Graphic | A string of characters. Represents the GRAPHIC DB2 data type. |
Integer | A 32-bit integer. Represents the INT DB2 data type. |
Int8 | A 64-bit integer. Represents the BIGINT, BIGSERIAL, INT8, SERIAL8 Informix data types, and the BIGINT DB2 data type. |
LongVarBinary | An array of bytes. Represents the LONG VARCHAR FOR BIT DATA DB2 data type. |
LongVarGraphic | A string of characters. Represents the LONG VARGRAPHIC DB2 data type. |
Money | A decimal value. Represents the DECIMAL DB2 data type. |
Numeric | A decimal value. Represents the DECIMAL DB2 data type. |
Real | A floating-point number. Represents the REAL DB2 data type. |
Real370 | A floating-point number. Represents the REAL DB2 data type. |
RowId | An array of bytes that represent the identifier of a row. Represents the ROWID DB2 data type. |
Serial | A 32-bit integer. Represents the INT DB2 data type. |
Serial8 | A 64-bit integer. Represents the BIGINT, BIGSERIAL, INT8, SERIAL8 Informix data types, and the BIGINT DB2 data type. |
SmallInt | A 16-bit integer. Represents the SMALLINT DB2 data type. |
Text | A large string of characters. Represents the CLOB DB2 data type. |
Time | A string that represents the time of day. Represents the TIME DB2 data type. |
Timestamp | A string that represents a timestamp. Represents the TIMESTAMP DB2 data type. |
VarBinary | An array of bytes. Represents the VARBINARY DB2 data type. |
VarChar | A string of characters. Represents the VARCHAR DB2 data type. |
VarGraphic | A string of characters. Represents the VARGRAPHIC DB2 data type. |
Xml | An XML document. Represents the XML DB2 data type. |
The following table shows mappings between DB2Type data types, Informix® data types, DB2® data types, Microsoft .NET Framework types, and DB2Types classes and structures.
Category | DB2Type Data Type | DB2 Data Type | Informix Data Type | .NET Framework Data Type | DB2Types Namespace Classes and Structures |
---|---|---|---|---|---|
Binary data | Binary | CHAR FOR BIT DATA | Byte[] | DB2Binary | |
Binary3 | BINARY | Byte[] | DB2Binary | ||
VarBinary3 | VARBINARY | Byte[] | DB2Binary | ||
LongVarBinary1 | LONG VARCHAR FOR BIT DATA | Byte[] | DB2Binary | ||
Character data | Char | CHAR | CHAR | String | DB2String |
VarChar | VARCHAR | VARCHAR | String | DB2String | |
LongVarChar1 | LONG VARCHAR | LVARCHAR | String | DB2String | |
Date/Time data | Date | DATE | DATETIME (date precision) | DateTime String5 |
DB2Date |
Time | TIME | DATETIME (time precision) | TimeSpan String5 |
DB2Time | |
Timestamp | TIMESTAMP | DATETIME (date and time precision) | DateTime String5 |
DB2TimeStamp | |
Graphic data | Graphic | GRAPHIC | String | DB2String | |
VarGraphic | VARGRAPHIC | String | DB2String | ||
LongVarGraphic1 | LONG VARGRAPHIC | String | DB2String | ||
LOB data | Clob | CLOB | CLOB, TEXT | String | DB2Clob |
Blob | BLOB | BLOB, BYTE | Byte[] | DB2Blob | |
DbClob | DBCLOB | String | DB2Clob | ||
Numeric data | SmallInt | SMALLINT | BOOLEAN, SMALLINT | Int16 | DB2Int16 |
Integer | INT | INT, INTEGER, SERIAL | Int32 | DB2Int32 | |
BigInt, BigSerial | BIGINT | BIGINT, BIGSERIAL, INT8, SERIAL8 | Int64 | DB2Int64 | |
Real | REAL | REAL, SMALLFLOAT | Single | DB2Real, DB2Real370 | |
Double | DOUBLE PRECISION | DECIMAL (≤ 29), DOUBLE PRECISION | Double | DB2Double | |
Float | FLOAT | DECIMAL (32), FLOAT | Double | DB2Double | |
Decimal | DECIMAL | MONEY | Decimal | DB2Decimal | |
DecimalFloat | DECFLOAT(16|34)3 | Decimal | DB2DecimalFloat | ||
Numeric | DECIMAL | DECIMAL (≤ 29), NUMERIC | Decimal | DB2Decimal | |
Row ID data | RowId | ROWID | Byte[] | DB2RowId | |
XML data | Xml2 | XML | Byte[] | DB2Xml | |
Cursor | Cursor2 | CURSOR |
For specific information about a data type, see the applicable topics in the DB2 Information Center.
DB2Type data type | Throws an exception at run time |
---|---|
Serial | No |
Int8 | No |
Serial8 | No |
Money | No |
DateTime | No |
Text | No |
Byte | No |
Char1 | Yes |
SmallFloat | Yes |
Null | Yes |
IntervalYearMonth | Yes |
IntervalDayFraction | Yes |
NChar | Yes |
NVarChar | Yes |
Set | Yes |
MutiSet | Yes |
List | Yes |
Row | Yes |
SQLUDTVar | Yes |
SQLUDTFixed | Yes |
SmartLobLocator | Yes |
Boolean | Yes |
Other | Yes |