Solved

PLS-00049: bad bind variable when calling stored procedure

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

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

740 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