Calling Oracle Function with "complex" return value from C#
Posted
by devdimi
on Stack Overflow
See other posts from Stack Overflow
or by devdimi
Published on 2010-03-18T09:39:45Z
Indexed on
2010/03/18
9:41 UTC
Read the original article
Hit count: 516
I have an Oracle function returning record defined in the package, so one can do:
select a,b,c FROM my_function(...);
Calling this oracle function from .NET is as simple as executing normal sql query.
Unfortunately the function has to do updates now and when it is called like this Oracle complains that updates are not allowed within selects and that makes sense. So now I am left with the choice to change the function call or to split the function. Basically I have to get rid of the select in the function call and need something like this in C#:
EXEC :var:= my_func(...);
where the type of var is custom tuple defined in the package. I have already tried using ParameterDirection.ReturnValue without success. Does anyone have an idea?
© Stack Overflow or respective owner