Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






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 topic entitled "Note on Connection Data Type Conversion Tables" in a previous chapter. These tables may have changed since this printing. For information about DB2 data types, see http://www.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 an IBM® Lotus® 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 Type
Attribute
Lotus Connector (LC) Data Type

BIGINT

Numeric

SMALLINT

Int

INTEGER

Int

DOUBLE

precision =15

Float

NUMERIC

prec-scale<=9, scale<=0

Int

NUMERIC

prec-scale<=19, scale<=4

Currency

NUMERIC

other

Numeric

DATE

Datetime

REAL

precision =7

Numeric

TIME

Datetime

TIMESTAMP

Datetime

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)

CLOB

Text (variable length, bound <= 2GB)

GRAPHIC

Text (fixed length, bound <= 16383)

VARGRAPHIC

Text (variable length, bound <= 16383)

LONG VARGRAPHIC

Text (variable length, bound <= 32700)

DBCLOB

Text (variable length, bound <= 2GB)

BLOB

Binary (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
Attribute
DB2 Data Type

Int

INTEGER, SMALLINT, DOUBLE (p), NUMERIC (p)

Float

INTEGER, SMALLINT, DOUBLE, NUMERIC (p)

Currency

INTEGER, SMALLINT, DOUBLE (p), NUMERIC (p)

Numeric

INTEGER (p), BIGINT, SMALLINT (p), DOUBLE (p), NUMERIC (p)

Datetime

TIMESTAMP (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)

BLOB

CHAR [FOR BIT DATA], VARCHAR [FOR BIT DATA], LONG VARCHAR [FOR BIT DATA], CLOB, GRAPHIC, VARGRAPHIC, LONG VARGRAPHIC, DBCLOB, BLOB

non-BLOB

Invalid

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
Attribute
DB2 Data Type

Int

INTEGER, SMALLINT (p), DOUBLE, NUMERIC (p)

Float

INTEGER (p), SMALLINT (p), DOUBLE, NUMERIC (p)

Currency

INTEGER (p), SMALLINT (p), DOUBLE (p), NUMERIC (p)

Numeric

INTEGER (p), BIGINT, SMALLINT (p), DOUBLE (p), NUMERIC (p)

Datetime

TIMESTAMP, DATE (p), TIME (p)

Text

CHAR [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)

Binary

any

CHAR [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 list

INTEGER (p), BIGINT, SMALLINT (p), DOUBLE, NUMERIC (p)

datetime list

TIMESTAMP, 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
Attribute
DB2 Data Type

Int

INT, SMALLINT, or NUMERIC (prec, 0)

Float

DOUBLE or NUMERIC (prec, scale)

Currency

NUMERIC (19, 4)

Numeric

NUMERIC (prec, scale), BIGINT

Datetime

TIMESTAMP, DATE, or TIME

Text

CHAR (fixed,len<=254), VARCHAR (254<len<=4000), LONG VARCHAR (4000<len<=32700), or CLOB (length > 32700)

Binary

BLOB

CHAR 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)

composite

CHAR (fixed,len<=254), VARCHAR (254<len<=4000), LONG VARCHAR (4000<len<=32700), or CLOB (length > 32700)

number list

DOUBLE

datetime list

TIMESTAMP

text list

CHAR (fixed,len<=254), VARCHAR (254<len<=4000), LONG VARCHAR (4000<len<=32700), or CLOB (length > 32700)




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009