XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 8.0pe
    • core-libs
    • b53
    • sparc
    • solaris_8
    • Not verified

      Given a situation where autocommit is off, and Given a SELECT that returns a ResultSet, rs, the first of whose columns is a Clob (of Blob, it doesn't matter and neither does the column number both are specified just for the following example), and Given
      Clob aTestClob = rs.getClob(1);

      What, if any, impact does rs.close() have on the just set aTestClob?

      The primary arguments given are, on one side:
      The ANSI SQL standard says, in 4.29.5 Locators:
      A locator may be either valid or invalid .A host parameter or host variable specified as a locator may be further specified to be a holdable locator. When a locator is initially created, it is marked valid and, if applicable, not holdable. A <hold locator statement> identifying the locator shall be specifically executed before the end of the SQL-transaction in which it was created in order to make that locator holdable.

      A non-holdable locator remains valid until the end of the SQL-transaction in which it was generated, unless it is explicitly made invalid by the execution of a <free locator statement> or a <rollback statement> that specifies a <savepoint clause> is executed before the end of that SQL-transaction if the locator was generated subsequent to the establishment of the savepoint identified by the <savepoint clause>.

      A holdable locator may remain valid beyond the end of the SQL-transaction in which it is generated. A holdable locator becomes invalid whenever a <free locator statement> identifying that locator is executed or the SQL-transaction in which it is generated or any subsequent SQL-transaction is rolled back. All locators remaining valid at the end of an SQL-session are marked invalid when that SQL-session terminates.


      ###@###.### 2004-02-02

            lancea Lance Andersen
            lancea Lance Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: