473,320 Members | 1,828 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,320 software developers and data experts.

Can you use "with hold" with a prepare statement?

9
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 have a procedure that dynamically creates and drops a table. So, I am using a prepare statement to get all the values from one of the columns. I am then calling a procedure for each returned row. However, the procedure that I am calling has a commit. This is causing my cursor to close. Is there any way that I can keep the cursor opened?

Thanks
Apr 18 '07 #1
3 1845
kalexin
20
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 have a procedure that dynamically creates and drops a table. So, I am using a prepare statement to get all the values from one of the columns. I am then calling a procedure for each returned row. However, the procedure that I am calling has a commit. This is causing my cursor to close. Is there any way that I can keep the cursor opened?

Thanks
How about using a holdable cursor?
http://publib.boulder.ibm.com/infocenter/cscv/v10r1/index.jsp?topic=/com.ibm.cloudscape.doc/cdevconcepts41275.html
Apr 18 '07 #2
vbace2
9
How about using a holdable cursor?
http://publib.boulder.ibm.com/infocenter/cscv/v10r1/index.jsp?topic=/com.ibm.cloudscape.doc/cdevconcepts41275.html
When looking at the link, it looks like this refers to using Java to open the cursor. I am trying this from a DB2 internal stored procedure.
Apr 19 '07 #3
kalexin
20
When looking at the link, it looks like this refers to using Java to open the cursor. I am trying this from a DB2 internal stored procedure.
You should be able to use WITH HOLD with a PREPARE. Are you using LUW or z/OS?
Apr 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: eman1000 | last post by:
I was recently looking at the prototype library (http://prototype.conio.net/) and I noticed the author used the following syntax: Object.extend(MyObj.prototype, { my_meth1: function(){},...
8
by: Rasmus Kromann-Larsen | last post by:
The With Conundrum I'm currently writing a master thesis on (preparations for) static analysis of JavaScript, and after investigating the with statement, it only even more evident to me that the...
25
by: samjnaa | last post by:
Please check for sanity and approve for posting at python-dev. In Visual Basic there is the keyword "with" which allows an object- name to be declared as governing the following statements. For...
14
by: Ivan Voras | last post by:
Hi, I'm looking for a construct that's similar to (Turbo) Pascal's "with" statement. I read about the Python's new "with" statement, but I was dissapointed to learn that it does something...
21
by: Mike N. | last post by:
Can someone tell me if there is a C# equivelent to the VBA 'with' statement that works like this: Set myControl = CommandBars(PopUpToUse).Controls.Add(msoControlButton, before:=5) With...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.