SAP Knowledge Base Article - Preview

3211139 - Query fails with "DateTime is invalid" error post applying an upgrade in either SP04 or SP05 - SAP IQ


  • Post upgrading to  IQ 16.1 SP04 or SP05 or applying a higher patch level in these service packs a query on a table containing a date time column may start to fail with  a   "DateTime is invalid" error



Could not execute statement.

DateTime is invalid (0)

-- (oslib/hos_date.cxx 56792)

SQLCODE=-1006167, ODBC 3 State="HY000"

Line 1, column 1


  • Customer may also see the following  message variants of the error ...


There was an error reading the results of the SQL statement.

The displayed results may be incorrect or incomplete.

  DateTime is invalid (111)

  -- (dflib/dfe_SACast.cxx 341)

  SQLCODE=-1006167, ODBC 3 State="HY000"


Exception Thrown from dflib/dfe_SACast.cxx:341, Err# 1, tid 502 origtid 502

O/S Err#: 0, ErrID: 527 (hos_dateexception); SQLCode: -1006167, SQLState: 'QBB67', Severity: 14


 oslib/hos_date.cxx 56847


  • Running a DBCC sp_iqcheckdb VERIFY consistency check  shows no errors.


  • Attempts to rebuild the table with sp_iqrebuildindex also fails.


  • Trying a suggested workaround of setting option "FP_NBIT_IQ15_COMPATIBILITY=ON"  as outlined in KBA 2861902 does not help.

  • Trying to select data from the problem table also fails.



  • SAP IQ 16.1 SP04.x any platform

  • SAP IQ 16.1 SP05.x any platform


SAP IQ 16.1


sybase, 'date time', abort, fail, corrupt, solaris, linux, aix, windows, ibm, sparc, IQ 15, IQ 16.0, patchlevel, install, upgrading, upgrade, incorrect, incomplete , KBA , BC-SYB-IQ , Sybase IQ , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.