Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

PLS-00049: bad bind variable when calling stored procedure

Posted on 2009-05-07
3
Medium Priority
?
2,740 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 1000 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

Industry Leaders: 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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

609 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