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 JCL INFORMATION - Need to know what t... gauravd01 JCL & VSAM 8 Wed Nov 29, 2017 12:54 pm
This topic is locked: you cannot edit posts or make replies. Rexx to Grab ISMF Information. upendrasri All Other Mainframe Topics 16 Sun Nov 26, 2017 12:35 am
No new posts -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Information About the Equifax Securit... Rohit Umarjikar PC Guides & IT News 6 Mon Sep 11, 2017 9:10 pm

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