I use Oracle 10g database and VS2008 with devart Linq To Sql technology. I have a Stored Function with 3 varchar2 params and a varchar2 return value. After I generated the mapping classes I get this code:
Code: Select all
[Function(Name=@"xxx", IsComposable=true)]
public System.String xxx(
[Parameter(Name="p1", DbType="VARCHAR2")]
string p1,
[Parameter(Name="p2", DbType="VARCHAR2")]
string p2,
[Parameter(Name="p3", DbType="VARCHAR2")]
string p3)
{
return ((System.String)(this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), p1, p2, p3).ReturnValue));
}
Error on reading data from IDataReader.
This exception has a message:
Ora-14551 Cannot perform DML operation inside a query.
But this function works right when I call it from PL/SQL Developer.
Why do I get this exception? Did I forgot something?
Thanks for your help in advance
Istvan Hegyes