Solved

PLS-00049: bad bind variable when calling stored procedure

Posted on 2009-05-07
3
2,525 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

739 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