The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

Hi

I have an issue. We were using jconn3 in our legacy application, in it, we do call statement.close and were able to use result Set mapped to that statement afterwards. Of course, the result set had only select statement.

Now when we move to Jconn4 , we are getting an error as "Result set already been closed".

Ideally we should have got that error even in Jconn3 , so i am confused why the different behavior? We have same code the only change is driver.

asked 09 Jul '15, 02:37

varkashy's gravatar image

varkashy
11111
accept rate: 0%


JConnect did not always know about or was unable utilize cursors in the database server and so, tended to fetch the entire result set to simulate cursor operations using client side buffers and gears. Either way your ability to access the result set after the statement is dependent upone that. I.E. Your current code seems to be expecting behaviour something more like (javax.sql.rowset) RowSet or CachedRowSet type behaviour than the standard ResultSet behaviour.

This could be due to needing to set something (in the API) to tell JConnect this way or you may not have installed the newer driver completely (there is a SQL script that needs to be applied and possible if you do that correctly it may change things).

But if this is an evolution of the product I would suggest you'll need to address this in your application's logic, possibly doing your own caching in the application instead of the driver.

HTH

permanent link

answered 09 Jul '15, 17:11

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
7.3k35107
accept rate: 31%

Hey Nick thanks for your post.

So my understanding is by default it provides ResultSet behavior and hence we should be expecting result set to be closed when statement is closed, is this understanding correct?

Regards Varun

(10 Jul '15, 01:36) varkashy
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×103
×33

question asked: 09 Jul '15, 02:37

question was seen: 1,604 times

last updated: 10 Jul '15, 01:36