Can a stored procedure return a recordset?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Can a stored procedure return a recordset?

  1. #1
    Join Date
    Nov 2000
    Posts
    1
    In MSSQL a stored procedure can return a recordset, which can then be used by a program such as Crystal Reports. Can Oracle stored procedures return recordsets? If so, how is this accomplished. Is it version dependent?

    Thanks
    Keith McConchie

  2. #2
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339

    It depends...

    By basic design - No.

    However, if the tool that you are using to access the Oracle database uses ADO, then - Yes.

    There are 2 ways to return a recordset from Oracle, through ADO, to your application.

    Here is a link for one method:
    [url]http://support.microsoft.com/support/kb/articles/Q176/0/86.ASP?LN=EN-US&SD=gn&FR=0[/url]

    Although the next example uses ASP on the client end, the Oracle side is what you're interested in.

    [url]http://support.microsoft.com/support/kb/articles/Q255/0/43.ASP?LN=EN-US&SD=gn&FR=0[/url]

    Basically, you can either return a set of table parameters (the first method) that ADO will translate into a recordset for you (slow) or you can return a ref cursor which ADO can also convert to a recordset for you (faster).

    Hope this helps

    - Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width