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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:41:48+00:00 2026-05-24T12:41:48+00:00

So i am working on a web service that will obtain data from a

  • 0

So i am working on a web service that will obtain data from a database utilizing two functions that make calls to the database. The goal is to have it so that if there is a specific value in one of the parameters lets say

            bool x= false;
        if ( "Y".Equals( parameterValve, StringComparison.InvariantCultureIgnoreCase ) )
            x= true;
                    if ( x)
                        cmd.Parameters.Add( "function_call1", OracleType.Cursor ).Direction = ParameterDirection.Output;  
                    else
                        cmd.Parameters.Add( "function_call2", OracleType.Cursor ).Direction = ParameterDirection.Output;                      
                        try
                        {
grab data here
}
return to webservice

I have all of this setup already and it works fine for the first parameter. However, when i call the webservice using the second parameter call i get this error.

System.Data.OracleClient.OracleException: ORA-06503: PL/SQL: 
Function returned without value
ORA-06512: at "database.package", line 103
ORA-06512: at line 1

My question is what exactly is the reason for this error to occur?
Is is because i am calling the function incorrectly or could there be somthing wrong with the function call itself?

Essecentially i’ve been staring at this code for some time now trying to figure out what it is i’ve done incorrectly so i was hoping someone might be able to point me in the right direction of where i should be looking to correct this error.

any help or suggestions are greatly appreciated.

Thanks!

  • 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-24T12:41:49+00:00Added an answer on May 24, 2026 at 12:41 pm

    There is something wrong with the function itself.

    Somehow, Oracle is getting to the end of the function without returning anything. For example, this function will run successfully if you pass in 1 argument and throw the ORA-6503 error if two arguments are passed in

    CREATE OR REPLACE FUNCTION throw_error( p_arg1 IN NUMBER,
                                            p_arg2 IN NUMBER DEFAULT null )
      RETURN NUMBER
    IS
    BEGIN
      IF( p_arg2 IS NULL )
      THEN
        RETURN 1;
      END IF;
    END;
    
    
    SQL> select throw_error(1) from dual;
    
    THROW_ERROR(1)
    --------------
                 1
    
    SQL> select throw_error(1,2) from dual;
    select throw_error(1,2) from dual
           *
    ERROR at line 1:
    ORA-06503: PL/SQL: Function returned without value
    ORA-06512: at "HR.THROW_ERROR", line 10
    ORA-06512: at line 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a web service that fetches data from an oracle data source
I'm working on a Wake on LAN service that will run from a web
I'm working on a web service that will be accessed from an Android app.
I'm working with a web service that will give me values like: var text
I am working on an enterprise system that will utilise a RESTful web service
I'm working on a web service that will create orders in SAP using .NET.
I'm working a .NET web service that will be processing a text file with
I have a web service that is working fine in one environment but not
I'm working on a Python library that interfaces with a web service API. Like
I'm working on a web app that is somewhere between an email service and

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.