473,383 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Cursors defined as "WITH HOLD" are closed after commit.

Hello.

W2K, DB2 ESE V8.2.1

I created a dummy sql sp that returns 2 result sets.
One of cursors inside it I declared as "with hold with return"
and another as "with return" (without "with hold").
When I call this sp from java application (started under JRE 1.4) that
uses jcc driver (suppose c - Connection object, cs - CallableStatement
object) with c.setAutoCommit(true) and cs declared as
cs = conn.prepareCall
(
"...",
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY,
ResultSet.HOLD_CURSORS_OVER_COMMIT
);

I get such results:

1. When I don't use c.commit() after cs.execute() I get these result
sets.
2. When I use c.commit() after cs.execute() I don't get any result
sets.

Question: Is it feature or bug?

When I do the same at OS400 (V5R2) using
"com.ibm.as400.access.AS400JDBCDriver" driver I still get these result
set even after c.commit(). It is strange too because I expect to get
only one (with option "WITH HOLD") result set...

Sincerely,
Mark B.

Nov 12 '05 #1
0 1585

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

68
by: Marco Bubke | last post by:
Hi I have read some mail on the dev mailing list about PEP 318 and find the new Syntax really ugly. def foo(x, y): pass I call this foo(1, 2), this isn't really intuitive to me! Also I...
8
by: gregory_may | last post by:
Is there a way to grab a "Screen Shot" that includes "Tool Tips"? I saw this code someplace, cant remember where. But it doesnt grab "Tool Tips". Is there a better way to do this in .net?...
4
by: db2group88 | last post by:
we are using db2 udb v8.2 on windows. all our tables are created with not logged initially property, So if i want to activate HADR (high availability disaster recovery) for the database, in...
15
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
6
by: John | last post by:
Hi I have this code as below that first runs a report and then an update query to set a flag so these records are not included in the report next time. Private Sub Command2_Click()...
0
by: David Mediavilla | last post by:
I am writing a client for an HTTPS web service using WSE 1.0 but I always get an error like "The underlying connection was closed: An unexpected error occurred on a send." Sometimes the error...
1
by: bobmct | last post by:
Anyone: As a non-js programmer (but incorporater of js code into my perl/php/html sites) I am attempting to create vertical self expanding menu (when the user cursors over a selection it will...
0
by: vibhusaxena23 | last post by:
Can anybody please help me why we are using "WITH REPLACE ON COMMIT PRESERVE ROWS NOT LOGGED IN(Tablespace)" in temporary table???
3
by: vbace2 | last post by:
Hi. I am using DB2 v9.1 fixpack 2. I was wondering if there is a way to use the with hold option when using the prepare statement. Or, is there another way that I can do what I need to? I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.