Specifying the data type

To override the default behavior and to explicitly specify the data type, a data type indicator must precede the bind value. The syntax for this is:

:bind([T|N|D],value)

The following table shows the data type indicators and the correspondence between each data type indicator and the Informix® data types.

Data Type Indicator Informix Data Type
T or TEXT SQL_CHAR
N or NUM or NUMBER SQL_NUMERIC
D or DATE SQL_DATETIME

For information about item formats and interpretation, refer to "Item properties" .

As an example of specifying a data type, if you want to bind a date value to a statement, it is always necessary to specify that the value is of data type DATETIME. The SQL statement would be entered as:

DBLOOKUP("select Age from Person where DateOfBirth=:bind([DATE]," +
           DateItem:Row + ")","DB.mdq","MyDB")