View previous topic :: View next topic |
Author |
Message |
nadh Intermediate
Joined: 08 Oct 2004 Posts: 192 Topics: 89
|
Posted: Mon Aug 01, 2005 2:52 am Post subject: sqlcode -504 |
|
|
Hi,
what is SQLCODE -504. i came to know that it comes when curssor name is invalid. i need complete details regarding that. when it occurs and how to resolve that.
thanks
nadh |
|
Back to top |
|
|
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Mon Aug 01, 2005 7:22 am Post subject: |
|
|
nadh,
It occurs when you don't declare the cursor and try to open it. Declare the cursor to resolve it. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
nadh Intermediate
Joined: 08 Oct 2004 Posts: 192 Topics: 89
|
Posted: Tue Aug 02, 2005 1:45 am Post subject: |
|
|
Kolusu,
if we don't declare the cursor and try to open it, at bind time we will get abend right. Pls. clarify. if we declare the cursor by one name and try to open with other name what will happen.
nadh. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Tue Aug 02, 2005 5:58 am Post subject: |
|
|
Nadh,
If you don't declare a cursor and try to open it then you will get an error during the pre-compilation it self. And the reverse is also true, if you try to open a cursor without defining it , then your will get an error during pre-compilation itself.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Raghesh Beginner
Joined: 09 Aug 2005 Posts: 1 Topics: 0
|
Posted: Tue Aug 09, 2005 6:06 am Post subject: -504 |
|
|
Hi all,
I am new to the group and I am going to share my exp on -504.
It happens when you are using cursor processing in db2 .
consider these screnerios.
1.
You have opened the cursor .
now you are fetching it and doing some processing.
After some time you are taking checkpoint to commit your operation.
Again you try to fetch it and you will get a -504 as the cursor table is closed because of commit.
soln: use with hold in your declare statement.
2.you have tried to close the cursor with out opening it.
There can be other scenerios also but these are the ones I faced.
Hope this helps.
Raghesh Gopinath |
|
Back to top |
|
|
|
|