ODBC - storing datesΒΆ

Storing dates in SQL databases

Some SQL databases do not support blank dates, and may not support null dates in key fields.

A blank date is one that has had a blank value stored.

A null date is one that has had no value stored.

For this reason, when a blank date in Sculptor is stored in an SQL database, it is mapped to a null date in a non-key field, or to 1/1/1753 in a key field. This is the earliest date that can be stored in an SQL time and date field, which is the field type used by Sculptor when storing dates, since it offers a wider range of dates than a short integer date field. (The time part is always 0.) The date range that can be supported varies according to the SQL database being used, but typically starts at 1/1/1753. Sculptor interprets this value as a blank date when reading an SQL database.

When working with SQL databases, it is advisable to design applications so that blank dates in key fields are avoided. This does not affect the operation of a blank date value in the find and match commands.

It is also recommended that short integer date fields be avoided in SQL databases. They are supported by Sculptor, but may not work correctly with blank dates.


RELATED TOPICS

ODBC