If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Returning Resultset from SP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-04-04, 13:04
toby25 toby25 is offline
Registered User
 
Join Date: Sep 2003
Posts: 63
Returning Resultset from SP

Hi All,

How do I return resultset from Stored Procedure to the application?

Thanks,
t
Reply With Quote
  #2 (permalink)  
Old 03-04-04, 13:30
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Through a cursor.
1) declare it (WITH RETURN TO CALLER)
2) open it
3) end SP

Leaving it open will return the result set to the caller

HTH

Andy
Reply With Quote
  #3 (permalink)  
Old 03-05-04, 16:30
beepyata beepyata is offline
Registered User
 
Join Date: Feb 2004
Posts: 9
Re: Returning Resultset from SP

Decalre number of resultset that the SQL procedure returns of Create Procedure statement using RESULT SET n, where n is the number of result sets.
Declare cursor CURSOR WITH RETURN FOR
Open cursor
Exit from Procedure without closing cursor

Cheers
Beepyata


Quote:
Originally posted by toby25
Hi All,

How do I return resultset from Stored Procedure to the application?

Thanks,
t
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On