Solved

PLS-00049: bad bind variable when calling stored procedure

Posted on 2009-05-07
3
2,561 Views
Last Modified: 2013-12-19
I am trying to call a stored procedure from within an existing Oracle stored procedure.  The stored procedure I am attempting to call returns a ref cursor.  The issue I encountered is I can't seem to define the ref cursor variable I need to pass to the stored procedure correctly.  I keep getting the error:  "PLS-0049:  bad bind variable".  See below code example.

Any help you could provide would be greatly appreciated.
Procedure Some_Procedure IS
x ref_cursor;
 
Begin
 
  Other_Proc('1','2','3','4',:x);
 
End Some_Procedure;
 
-- Other Procs in/out variables
Procedure Other_Proc
(
var1  varchar2,
var2  varchar2,
var3  varchar2,
var4  varchar2,
P_CURSOR  IN OUT   RET_REFCURSOR);

Open in new window

0
Comment
Question by:DCG_Developer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 250 total points
ID: 24327884
remove the colon in front of x in your call.

Procedure Some_Procedure IS
x ref_cursor;
 
Begin
 
  Other_Proc('1','2','3','4',x);
 
End Some_Procedure;
0
 

Author Comment

by:DCG_Developer
ID: 24327972
Thanks, can't believe I missed that.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 24328986
no problem, glad I could help
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many‚Ķ
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question