Informix

Expand all | Collapse all

Error converting data type DBTYPE_DBDATE to date.

  • 1.  Error converting data type DBTYPE_DBDATE to date.

    Posted Mon February 22, 2021 10:31 AM
    We have two different servers one is SQL server 2005 another which we recently migrated to SQL Server 2019.
    Linked server query is running properly on sql server 2005.but issue in the SQL server 2019. it throws "Msg 8114, Level 16, State 10, Line 1
    Error converting data type DBTYPE_DBDATE to date." Please have a look at the date column which has not in the "yyyy-MM-dd hh:mm:ss:fff" .
    SQL SERVER 2019:

    SQL SERVER 2005:
    If you see the same column in SQL server 2005 .which is in the "yyyy-MM-dd hh:mm:ss:fff" .


    May I know the issue. Please help me on this?

    ------------------------------
    bhimagonolla sureshgoud
    ------------------------------


  • 2.  RE: Error converting data type DBTYPE_DBDATE to date.

    Posted Tue February 23, 2021 01:20 AM
    Hi Bhimagonolla,

    If the column is defined "same" in both SQL Server 2015 and 2019 versions, I think first you need to check why its not displaying in the same format in both versions. May be something changed in SQL Server 2019 for DATE/DATETIME formats? It may help to make SELECT query specify the format of DATE/DATETIME as well. I came across below link, please take a look if this helps. What's the Informix CSDK/ODBC version you are using? By any chance you have DBDATE Informix environment variable specified in both/one version(s) of SQL Server machine?

    https://www.sqlservercentral.com/forums/topic/error-converting-data-type-dbtype_dbdate-to-date

    Thanks
    -Shesh


    ------------------------------
    Sheshnarayan Agrawal
    ------------------------------