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 6663743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:31:57+00:00 2026-05-26T02:31:57+00:00

I have the following code in an oracle procedure, which returns a cursor (

  • 0

I have the following code in an oracle procedure, which returns a cursor (r_cursor) as an OUT parameter

SELECT userid
      INTO v_userid
      FROM users u
     WHERE lower(u.email) = lower(p_email)
       AND lower(u.token) = lower(p_IV);

UPDATE users u
   SET u.token = NULL,
       u.lastlogin = sysdate()
 WHERE u.userid = v_userid;

  OPEN r_cursor FOR
    SELECT u.firstname,
           u.lastname
      FROM users u
     WHERE u.userid = v_userid;

When calling the procedure from oracle everything works completely fine.

But when calling the procedure from a .Net application, the error ORA-24338: statement handle not executed is raised.

After a lot of testing, I find out that if I remove one of the lines lower(u.token) = lower(p_IV) from the SELECT statement or u.token = NULL, from the UPDATE statement, the cursor is returned to the .Net application without any error.

  • 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-05-26T02:31:58+00:00Added an answer on May 26, 2026 at 2:31 am

    The ORA-24338 is usually raised when you try to fetch a cursor that has not been opened yet.

    This could be raised for example if your procedure raised an exception before the OPEN statement. Afterwards when you try to fetch from the cursor oracle would raise the ORA-24338 since the cursor has never been opened.

    Do you have an EXCEPTION block (with a WHEN OTHERS for example) in your PL/SQL, or do you catch SQL exception in .net?

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

Sidebar

Related Questions

I have the following code which connects to a oracle database via soap, creates
I have following Code Block Which I tried to optimize in the Optimized section
i have following code to show div on page <div id=all_users> <div id=user11 userid=11
I have the following entry in my c:\Oracle\product\11.1.0\network\ADMIN\TNSNAMES.ORA file. enter code here pvtest.world =
I have a following oracle sql query in which START_DATE is a number column
I have the following bit of code that reads data from the an Oracle
guys i have seen following code in internet select round(abs(months_between(sysdate,add_months(hire_date,12*(round((months_between(sysdate,hire_date)/12))))))) from employees unfortunately there
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
I have following code in my application: // to set tip - photo in
I have following code in my Application. Comments in my code will specify My

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.