Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using an IN Clause in a Stored Procedure

850978Apr 25 2011 — edited May 10 2011
Hello All:

I have come to the conclusion that my stored procedure is having a problem with the use of an IN clause using a parameterized query.

I have in my Stored Procedure the following: AND oh.status_flag IN (p_OrderStatus)

The p_OrderStatus will contain values along the lines of:
1). p_OrderStatus = 'X'
2). p_OrderStatus = 'X', 'S', 'W'

In my .Net code, I am setting the parameter value as being:
oCommand.Parameters.Add("p_OrderStatus", OracleDbType.Varchar2).Value = Status;

However: this isn't working as something in the IN clause doesn't seem to work as I expected, but if I do the same query through a TORA window, it brings back values.

What is causing this to stop working once I move it to a Stored Procedure and how do I fix it (either the .Net side or the Oracle Side, which I assume it would be something on the Oracle side of things).

Any help is greatly appreciated

Thanks
Andy
This post has been answered by Tridus on May 10 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 7 2011
Added on Apr 25 2011
1 comment
1,378 views