views:

36

answers:

3

I want to pass one array and one integer variable to a oracle stored procedure from c#.net application. I can pass both parameter as array but can't pass two different type of variable. Is there any solution where I can pass array and any other type of variable together?

A: 

You can use the IN keyword to pass the parameters as input.

Check here for more details:

http://www.exampledepot.com/egs/java.sql/CreateProcedureAndFunction.html

So your array and the other variable can both have IN and be sent as parameters.

Mamta Dalal
Thank you for your answer. But my problem is I can't pass two different type of parameters. If I pass two array, the application works fine but if I pass one array and one int32 (using IN), I got the error :casting error from System.Int32 to System.Array.
Avro
You have to ensure the order in which they are passed matches the order in which they are received in the procedure.
Mamta Dalal
A: 

Pass a delimited string and split it on the DB.

Esteban Araya
Thank you Esteban. I will apply that option at the end if I can't solve this problem.
Avro
A: 

Thank you everyone . The problem is solved.

Avro