Previous: ODBC Reading, Up: ODBC Datatypes [Contents][Index]
When writing data to the database the following SQL datatypes are supported.
A list of character codes, or a list of atoms.
For backwards compatibility only, an atom is also accepted, but
note that the atoms
 have special meaning
(as SQL null value and empty code list, respectively) and more
atoms with special meaning may be introduced in the future. For
compatibility with some ODBC drivers, the integer 0 and 1 are
allowed, meaning "0" and "1".
0 for false, or
1 for true.
A floating point number or a small integer.
date(Year, Month, DayOfMonth), as above.
time(Hour, Minute, Second), as above.
timestamp(Year, Month, Day, Hour, Minute, Second,
Fraction), as above.
SQL_BINARYand other binary types
SQL_INTERVAL_HOURand other interval types
Currently not supported.
if a value is out of range for the corresponding SQL
type, e.g. a too large integer for
result is undefined.
Note that atoms with names that start with an upper case letter,
SQL_CHAR must be quoted in Prolog, e.g.