View previous topic :: View next topic
|
Author |
Message |
r.ravikumar
New User
Joined: 05 Jan 2007 Posts: 18 Location: chennai
|
|
|
|
What will happen if i tried to close the cursor which is not opened. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Try and tell us |
|
Back to top |
|
|
Richa Jain
New User
Joined: 18 Mar 2008 Posts: 35 Location: Gurgaon
|
|
|
|
To my knowledge when the CLOSE statement is executed, the cursor must be in the open state.
If we are closing an unopened cursor , we must get an sql error, SQLCODE = -501. |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
the answer is easy:
Code: |
DSNT408I SQLCODE = -501, ERROR: THE CURSOR IDENTIFIED IN A FETCH OR CLOSE STATEMENT IS NOT OPEN
|
BUT....We were waiting for the OP to post the answer after trying it.... |
|
Back to top |
|
|
abiyn
New User
Joined: 25 Mar 2008 Posts: 12 Location: Chennai
|
|
|
|
The program will go in infinite loop with the SQLCODE error -501. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
The program will go in infinite loop with the SQLCODE error -501
|
please, if you are trying to up your post count, at least avoid making non-sense comments. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
/friendly humor on
unless the poster belongs to the ...
I always want to see a 0 return code club
/pseudocode on
do until rc .eq. 0
close cursor
end |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
Dick Brenholtz ,
I don’t understand What is wrong in my comments. I just replied for that question.
Why should I try to post unnecessarily?
I know this is Technical forum.
Behave in a matured and professional manner
|
I thought that I was rather civil.
how's this?:
to say that a program, that you have never seen, will go into an infinite loop because of a -501 sqlcode, is dummmmmmmmmmmmb.
Don't come whinning via private messages, I will publicize them. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
So here are my two cent too !
Seams to be funny, that one can engage so many it-proffesionals with such a question. Before asking, just have a test and see.
@Dick
...your right !
...so now, also my post count is at least one more !!!
Regards, UmeySan |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
yeah, right with the knowledge, left (without) people skills.
still smarting over the esds aix.
abiyn,
my apologizes. nothing you said required the response that I gave.
dbz |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Quote: |
still smarting over the esds aix. |
... are there any more tests that I should run |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
no enrico,
esds do not have primary indexes, yet you can create an aix.
had my head in the sand, just could not believe it. learned alot from that thread (where I should actually be puting this post).
dbz |
|
Back to top |
|
|
|