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

DB2 Cursor Issue

1
I have two DB2 cursors accessing the same tabel but in adifferent order.

I open the first one, fetch all the data, Then close it.

When I open the second one with the new order, it starts at the last row of the first cursor. I even tried doing a commit to see if it would clear but it doesn't.

How can I get the second cursor to start at the first row in the new order?

Thanks
below are the definitions of the two cursors:
EXEC SQL
DECLARE NUM-ACCT-CURSOR CURSOR FOR
SELECT NUM_OFFICE
,NUM_ACCT
,KEY_TMS
FROM TCLIENT
WHERE NUM_OFFICE <= 799
ORDER BY NUM_OFFICE, NUM_ACCT
WITH UR
END-EXEC.

EXEC SQL
DECLARE KEY-TMS-CURSOR CURSOR FOR
SELECT NUM_OFFICE
,NUM_ACCT
,KEY_TMS
FROM TCLIENT
WHERE NUM_OFFICE <= 799
ORDER BY KEY_TMS
WITH UR
END-EXEC.
Oct 5 '07 #1
0 1246

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

Similar topics

1
by: Jim | last post by:
I having a difficult time here trying to figure out what to do here. I need a way to scroll through a recordset and display the results with both forward and backward movement on a web page(PHP...
2
by: Csaba2000 | last post by:
The following code has me so confused, I don't even know the right questions to ask. Opera 7.01 and IE 5.5 both exhibit behaviours I don't understand while NN 6.1 seems to ignore me altogether. ...
0
by: Prashanth | last post by:
I am getting this error from BEA DB2 Driver in weblogic console. java.sql.SQLException: CURSOR C02 NOT IN A PREPARED STATE java.sql.SQLException: CURSOR C02 NOT IN A PREPARED STATE We keep...
4
by: BBFrost | last post by:
We have a data entry application written within Framework 1.0 that contains 20+ custom user controls. The controls overlay each other so that only one custom control is visible at a time. What...
8
by: spider007 | last post by:
Hi all, I have a peculiar problem. I have a query which returns multiple rows. I want to perform some operations on the output row by row. For that, i declared a cursor and fetching the rows. Now...
5
by: szymon.strus | last post by:
Hello I have a VB6 application using classic ado (MDAC 2.8) for connecting ms sql 2000 server. Application uses a lot of server side cursors. Now I want to switch to ms sql 2005 server but I...
1
by: shorti | last post by:
Hello all, I asked this question a slightly different way earlier and didnt get a response so I thought I would rephrase it. I contacted db2 support on it also but never got a definite...
3
by: Klaus Brune | last post by:
Hello all, When one tabs through a form (specifically, in Firefox), all the text in a field is automatically selected. What I'm looking for is a way to put a function (in onFocus perhaps)...
1
by: bibhukdas | last post by:
Hi All, Just to elaborate on the issue. The requirement is to handle this in javascript 1. User clicks on a button 2. Change the cursor style (We are using document.body.style.cursor="wait") 3....
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
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.