Last post Dec 28, 2016 09:51 AM by Eric Du
Dec 19, 2016 10:20 AM|Sanfoor|LINK
i have a function in oracle with this signature
test_fun(p_nat_no in number,p_number_type in number) RETURN test_table
in the c# this is the code
string select = "test_fun";
using (OracleConnection connection = new OracleConnection(helper.Global.ConnectionString))
OracleCommand command = new OracleCommand(select, connection);
// command.CommandType = CommandType.StoredProcedure;
OracleParameter PrmnatNo = new OracleParameter("p_nat_no ", natNo);//natNo
OracleParameter pramNumberType = new OracleParameter("p_number_type ", numberType);
using (OracleDataReader reader = command.ExecuteReader())
List<test_table> Tickets = new List<test_table>();
else return null;
but when trying to call the function from c# an error appears, ? any help? suggestions?
Dec 19, 2016 02:00 PM|PatriceSc|LINK
And how would you call it from PL/SQL? I'm not suing Oracle from what I see the syntax seems to be something such as :
select * from table(test_fun(:p_nat_no,:p_number_type))
Also when you have an error, it's likely best to always tell which error you have (or the best English translation you can). More likely it would confirm a SQL syntax errror (for now this is my guess based on what I'm used to with function
returning result sets in SQL Server which needs to be used where a table is used rather than directly as their own SQL statement).
Dec 28, 2016 09:51 AM|Eric Du|LINK
According to your description, I hope you can debugger your code, check in which line it stops and post the detail error message, then post it. So that we can better help you solve your problem!