Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4356795

JDBC API does not allow creation or modification of Struct and Array objects

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 6
    • 1.3.0
    • core-libs
    • beta2
    • x86
    • windows_nt
    • Verified

      Name: skT45625 Date: 07/26/2000


      java version "1.2.2"
      Classic VM (build JDK-1.2.2-W, native threads, symcjit)

      There is no portable way to create or modify a Struct or Array object using the
      JDBC API.

      It *is* possible to:
      1. Read a Struct or Array from a JDBC Connection (ResultSet.getObject(...))
      2. Write a Struct or Array to a JDBC Connection (PreparedStatement.setObject
      (...))

      but it is not possible to:
      3. Create a new Struct or Array value without using driver specific code (e.g.
      a constructor for an implementation of either interface)

      4. Modify the content of a Struct or Array between the read and write operations

      Why are there no Array.setArray(...), Struct.setAttributes(...),
      Connection.createArray(...), Connection.createStruct(...) methods in JDBC?
      (Review ID: 107409)
      ======================================================================

            lancea Lance Andersen
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: