Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8169487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:51:27+00:00 2026-06-06T20:51:27+00:00

Can Oracle Ref Cursors only be used with Procedures and Functions, or can they

  • 0

Can Oracle Ref Cursors only be used with Procedures and Functions, or can they also be used with PL/SQL issued via an ODP.NET OracleCommand object (contained as a string in the CommandText property)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:51:28+00:00Added an answer on June 6, 2026 at 8:51 pm

    It depends on what you are trying to accomplish.

    You can certainly execute an anonymous PL/SQL block from a .Net or a Java application that internally makes use of a REF CURSOR. Since anonymous PL/SQL blocks do not accept or return parameters, however, you cannot return a REF CURSOR that you open in an anonymous PL/SQL block to the calling application.

    From an application architecture standpoint, I would strongly advocate that if you need to do processing that requires PL/SQL, that processing ought to be incorporated into a named PL/SQL block (a procedure or a function) that is in a package and stored in the database. Having logic implemented in PL/SQL that is stored outside the database is generally a bad idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm calling a procedure (from C# via ODP.Net with Oracle.DataAccess.dll 4.112.3.0 to OracleDB 11.2.0.1
In Oracle / SQL Server I can use the WITH keyword to define a
How can I connect to an Oracle database and SQL Server 2005-2008 database with
Can anyone give an example of the use of REF CURSOR from Oracle using
In Oracle I can declare a reference cursor... TYPE t_spool IS REF CURSOR RETURN
In Oracle you can use &&VAR_NAME in a script and then the script will
I know that in Oracle I can get the generated id (or any other
How can I do the oracle equivalent of: to_char(date_field, 'YYYY-MM-DD:HH') # e.g. 2012-05-25:19 in
Can anyone provide a working sample code to convert following Oracle DB table with
In Oracle, we can use FOR employee_rec in (select id from mytbl) LOOP DBMS_OUTPUT.PUT_LINE(employee_rec.id);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.