Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-1393

PreparedStatement.setObject(int,Object,int) should throw SQLFeatureNotSupportedException for unsupported types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.2.1.6
    • 10.2.1.6
    • JDBC, SQL
    • None
    • JDBC 4, jdk 1.6

    Description

      From the javadoc:

      Throws:
      ...
      SQLFeatureNotSupportedException - if targetSqlType is a ARRAY, BLOB, CLOB, DATALINK, JAVA_OBJECT, NCHAR, NCLOB, NVARCHAR, LONGNVARCHAR, REF, ROWID, SQLXML or STRUCT data type and the JDBC driver does not support this data type

      Since Derby doesn't support ARRAY, DATALINK, NCHAR, NCLOB, NVARCHAR, LONGNVARCHAR, REF, ROWID, SQLXML or STRUCT the method should throw SQLFeatureNotSupportedException if used with any of these types. Currently a general type conversion exception is thrown:

      >>1) testSetObjectNotImplementedARRAY(org.apache.derbyTesting.functionTests.tests.jdbc4.PreparedStatementTest)SQL Exception: An attempt was made to get a data value of type 'CLOB' from a data value of type '2003'.
      >>Caused by: SQL Exception: An attempt was made to get a data value of type 'CLOB' from a data value of type '2003'.

      Attachments

        1. derby-1393-v1.diff
          27 kB
          Knut Anders Hatlen
        2. derby-1393-v1.stat
          1 kB
          Knut Anders Hatlen

        Activity

          People

            knutanders Knut Anders Hatlen
            dyret Dyre Tjeldvoll
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: