Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5949

SQLServer DateTimeOffset datatype is read as object(34)

    XMLWordPrintable

Details

    • DV Sprint 66
    • 0.1
    • Hide

      1. Create a table in SQLSERVER2012 with datetimeoffset column.
      2. Create a connection using Teiid and Microsoft JDBC driver.
      3. Try to insert null using PreparedStatement.setNull()

      Show
      1. Create a table in SQLSERVER2012 with datetimeoffset column. 2. Create a connection using Teiid and Microsoft JDBC driver. 3. Try to insert null using PreparedStatement.setNull()
    • 61518835

    Description

      Hi,

      I am trying to set null in datetimeoffset datatype of SQLSERVER using Teiid , but it is giving the error as:
      org.teiid.jdbc.TeiidSQLException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 B_MSSQL1: S0003 Implicit conversion from data type varbinary to datetimeoffset is not allowed. Use the CONVERT function to run this query.
      at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:131)
      at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:67)
      at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:752)
      at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:62)
      at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:562)
      at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:131)
      at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:36)
      at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:75)
      at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:281)
      at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:333)
      at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:423)
      at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:571)
      at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:420)
      at org.teiid.jdbc.PreparedStatementImpl.executeBatch(PreparedStatementImpl.java:296)

      I am just using a table, with only one column "datetimeoffset" and when I an using Preparedstatement.setNull(1, Types.TIMESTAMP), it is throwing this error.

      Also the datetimeoffset datatype is read as "object(34)" while fetching the schema using Teiid and Microsoft JDBC driver.

      Please suggest any ways to overcome this issue.

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-shawkins Steven Hawkins
              manoj1492 Manoj Majumdar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1 hour Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 30 minutes
                  1h 30m