IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need information about Cursor?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sivasaras

New User


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

PostPosted: Tue Feb 02, 2010 8:58 am
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
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

Moderator Emeritus


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

PostPosted: Tue Feb 02, 2010 9:54 am
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Extract all the TWS scheduler informa... IBM Tools 1
No new posts Table Information - DB2 DB2 1
No new posts Remove additional information in SUPE... TSO/ISPF 10
This topic is locked: you cannot edit posts or make replies. Control-M Information. CLIST & REXX 1
Search our Forums:

Back to Top