473,796 Members | 2,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 Cursor Issue

1 New Member
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 1259

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

Similar topics

1
7687
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 using ADO/COM).. I know that if I use a client side cursor all the records get shoved to the client everytime that stored procedure is executed..if this database grows big wont that be an issue?.. I know that I can set up a server side cursor...
2
4582
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. The upshot: .style.cursor seems to be ignored under certain circumstances. Let's take something that's mostly repeatable and maybe someone can explain to me what's happening. In Opera 7.01
0
6259
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 running into this problem, frequently almost everyday. We figured what exactly to do when the problem happens but not the reason or the solution to this.
4
2693
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 is the best way to keep the cursor from jumping to another non-visible control when the user tabs past the (currently designated) last control on the form. I've had some luck using the Leave event but the last visible control can change...
8
3371
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 the problem is, that if run the query on DB2 command, I am getting the output in 11 minutes and as soon as i put the query in SP in cursor and i do a simple OPEN <cursorname>, it takes more than 2 hrs. I am running DB2 v8.2 on AIX.
5
5352
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 have noticed very serious performance problem. Sql profiler results of execution of following commands: declare @p1 int set @p1=180150131
1
3302
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 answer..I got a lot of "should be" and "maybe". DB2 Info Center states this: Description
3
4620
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) that will automatically move to the END of the existing text (a blinking cursor). Yes, I've Googled, but cannot seem to locate just what I'm looking for.
1
2479
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. Send an Ajax request and do the processing 4. Once the processing is done change back the cursor to original style (We are using document.body.style.cursor="default") We are able to achieve 1 to 3 .Req 4 is where we have a issue. The issue is...
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10237
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10187
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10018
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6795
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5446
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5578
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.