LOTUS CONNECTORS


DB2 Data Types
The following tables show the correspondences of DB2 to LotusScript data types.

In DB2, the data type pairs DOUBLE and FLOAT and NUMERIC and DECIMAL are synonymous, and only the first of each type synonym (DOUBLE and NUMERIC) is indicated in these tables.


Note For more information on the organization of these tables, see the section entitled “Note on Connection Data Type Conversion Tables” in Chapter 3. These conversion tables may have changed since this printing. For the latest information about IBM's DB2 data types, see the IBM Web site http://www-4.ibm.com/software/data/db2.

Data Type Considerations

The following considerations pertain to use of DB2 data types.


Note There is a limitation on how Lotus Connectors interpret a Notes NUMBER field. When you use the "Create Target Metadata" option from a Notes source, heavy precision loss may occur with Notes NUMBER fields.

Execute

This table describes how the Execute method converts data types between LotusScript Connector Extensions and DB2.

DB2 Data TypeAttributeLotus Connector (LC) Data Type
BIGINTNumeric
SMALLINTInt
INTEGERInt
DOUBLE precision =15Float
NUMERICprec-scale<=9, scale<=0Int
NUMERICprec-scale<=19, scale<=4Currency
NUMERICotherNumeric
DATEDatetime
REALprecision =7Numeric
TIMEDatetime
TIMESTAMPDatetime
CHAR(default)

FOR BIT DATA

Text (fixed length, bound <= 32766)

Binary (BLOB format) (fixed length, bound <= 32766)

VARCHAR(default)

FOR BIT DATA

Text (variable length, bound <= 32740)

Binary (BLOB format) (variable length, bound <= 32740)

LONG VARCHAR(default)

FOR BIT DATA

Text (variable length, bound <= 32740)

Binary (BLOB format) (variable length, bound <= 32740)

CLOBText (variable length, bound <= 2GB)
GRAPHICText (fixed length, bound <= 16383)
VARGRAPHICText (variable length, bound <= 16383)
LONG VARGRAPHICText (variable length, bound <= 32700)
DBCLOBText (variable length, bound <= 2GB)
BLOBBinary (BLOB format) (variable length, bound <= 2GB)

Fetch

This table describes how the Fetch method converts data types between LotusScript Connector Extensions and DB2.
Lotus Connector (LC)
Data Type
AttributeDB2 Data Type
IntINTEGER, SMALLINT, DOUBLE (p), NUMERIC (p)
FloatINTEGER, SMALLINT, DOUBLE, NUMERIC (p)
CurrencyINTEGER, SMALLINT, DOUBLE (p), NUMERIC (p)
NumericINTEGER (p), BIGINT, SMALLINT (p), DOUBLE (p), NUMERIC (p)
DatetimeTIMESTAMP (p), DATE, TIME
Text (o)CHAR [FOR BIT DATA], VARCHAR [FOR BIT DATA], LONG VARCHAR [FOR BIT DATA], CLOB, GRAPHIC, VARGRAPHIC, LONG VARGRAPHIC, DBCLOB, BLOB
Binary (o)BLOBCHAR [FOR BIT DATA], VARCHAR [FOR BIT DATA], LONG VARCHAR [FOR BIT DATA], CLOB, GRAPHIC, VARGRAPHIC, LONG VARGRAPHIC, DBCLOB, BLOB
non-BLOBInvalid

Insert/Update

This table describes how the Insert and Update methods convert data types between LotusScript Connector Extensions and DB2.

Lotus Connector (LC)
Data Type
AttributeDB2 Data Type
IntINTEGER, SMALLINT (p), DOUBLE, NUMERIC (p)
FloatINTEGER (p), SMALLINT (p), DOUBLE, NUMERIC (p)
CurrencyINTEGER (p), SMALLINT (p), DOUBLE (p), NUMERIC (p)
NumericINTEGER (p), BIGINT, SMALLINT (p), DOUBLE (p), NUMERIC (p)
DatetimeTIMESTAMP, DATE (p), TIME (p)
TextCHAR [FOR BIT DATA] (o), VARCHAR [FOR BIT DATA] (o), LONG VARCHAR [FOR BIT DATA] (o), CLOB (o), GRAPHIC (o), VARGRAPHIC (o), LONG VARGRAPHIC (o), DBCLOB (o), BLOB (o)
BinaryanyCHAR [FOR BIT DATA] (o), VARCHAR [FOR BIT DATA] (o), LONG VARCHAR [FOR BIT DATA] (o), CLOB (o), GRAPHIC (o), VARGRAPHIC (o), LONG VARGRAPHIC (o), DBCLOB (o), BLOB (o)
number listINTEGER (p), BIGINT, SMALLINT (p), DOUBLE, NUMERIC (p)
datetime listTIMESTAMP, DATE (p), TIME (p)

Create

This table describes how the Create method converts data types between LotusScript Connector Extensions and DB2.

Lotus Connector (LC)
Data Type
AttributeDB2 Data Type
IntINT, SMALLINT, or NUMERIC (prec, 0)
FloatDOUBLE or NUMERIC (prec, scale)
CurrencyNUMERIC (19, 4)
NumericNUMERIC (prec, scale), BIGINT
DatetimeTIMESTAMP, DATE, or TIME
TextCHAR (fixed,len<=254), VARCHAR (254<len<=4000), LONG VARCHAR (4000<len<=32700), or CLOB (length > 32700)
BinaryBLOBCHAR FOR BIT DATA (fixed,len<=254), VARCHAR FOR BIT DATA (254<len<=4000), LONG VARCHAR FOR BIT DATA (4000<len<=32700), or BLOB (length > 32700)
compositeCHAR (fixed,len<=254), VARCHAR (254<len<=4000), LONG VARCHAR (4000<len<=32700), or CLOB (length > 32700)
number listDOUBLE
datetime listTIMESTAMP
text listCHAR (fixed,len<=254), VARCHAR (254<len<=4000), LONG VARCHAR (4000<len<=32700), or CLOB (length > 32700)