Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need information about Cursor?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
sivasaras

New User


Joined: 29 Sep 2007
Posts: 90
Location: chenna/i-

PostPosted: Tue Feb 02, 2010 8:58 am    Post subject: Need information about Cursor?
Reply with quote

Hi,

can we fetch the rows without opening the cursor? kindly let me know
what kind of error we can get?

Thanks in Advance.

Regards,
Siva
Back to top
View user's profile Send private message

balubhat

New User


Joined: 04 Oct 2005
Posts: 19
Location: Singapore

PostPosted: Tue Feb 02, 2010 9:17 am    Post subject:
Reply with quote

Hello Sivasara

I would suggest you to try it yourself.

you will get SQLCODE -501
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 02, 2010 9:54 am    Post subject:
Reply with quote

Hello,

Quote:
can we fetch the rows without opening the cursor?
If the cursor was not opened,what would there be to fetch. . . icon_confused.gif

How does such a question originate?

Possibly, this is a completely different question and i've misunderstood.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Tue Feb 02, 2010 7:17 pm    Post subject:
Reply with quote

If your question is how you can execute a fetch without opening a cursor. Then, you can't, at least not without getting a SQL errror.

But if you are shure your select will return only one row, you can issue the select statement directly in your application program. If the result yields more that one row you will get a -811, as I recall.
Back to top
View user's profile Send private message
elijarajesh.mf
Warnings : 1

New User


Joined: 02 Feb 2010
Posts: 14
Location: hyderabad

PostPosted: Tue Feb 02, 2010 7:22 pm    Post subject: Reply to: Need information about Cursor?
Reply with quote

We can not fetch the rows with out opening the cursor.You will get the SQLCODE as -501.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Information About the Equifax Securit... Rohit Umarjikar PC Guides & IT News 6 Mon Sep 11, 2017 9:10 pm
No new posts retrieving envelope information out o... VintageReceiver TSO/ISPF 6 Thu Aug 10, 2017 8:13 pm
No new posts Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
No new posts Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts Release of Adabas Cursor mohitsethi All Other Mainframe Topics 1 Mon Feb 06, 2017 8:36 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us