When you use Adaptive Server ODBC Driver
15.0 or earlier, or connect to Adaptive Server version 15.0.x or
earlier, and the application binds a datetime parameter
to an invalid datetime range, such as 01-01-0001,
the Adaptive Server ODBC Driver
returns error 30122, Invalid datetime field. Year
is out of range
.
For an Adaptive Server ODBC Driver
15.5 that is connected to Adaptive Server 15.7, this behavior has
changed. In the 15.7 versions, Adaptive Server ODBC Driver sends the date to Adaptive
Server, and Adaptive Server returns an error. The error code returned
is 247, Arithmetic overflow during implicit
conversion of BIGDATETIME value 'Jan 1 0001 12:00AM' to a DATETIME
field
, or something similar.