ODBC: Using Bind Variable With TO_DATE May Result in Datetime Field Overflow Error (Doc ID 1268043.1)

Last updated on JULY 05, 2017

Applies to:

Oracle ODBC Driver - Version: 10.2.0.4 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.

Symptoms

Using a bind variable in TO_DATE 

    INSERT INTO DATECOL VALUES(TO_DATE(?,'DD-MON-YYYY HH24:MI:SS'))"

may result in the following error with some ODBC applications:

DIAG [22008] [Oracle][ODBC]Datetime field overflow. (0)

Changes

This behavior may be noticed after upgrade from an earlier version of Oracle ODBC Driver, as prior to 10.1.0.2, the Oracle ODBC Driver always returned a VARCHAR2 for SQLDescribeParam.

However, due to <>, the ODBC driver now attempts to provide useful information for Insert/Update statements.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms