Stored Function call problem

Stored Function call problem

Postby histu » Mon 23 Nov 2009 10:05

Hi

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));
}


When I try to run the function I get an exception:
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
histu
 
Posts: 7
Joined: Fri 09 Oct 2009 08:57

Postby AndreyR » Tue 24 Nov 2009 16:04

I recommend you to inspect the generated SQL query using the DataContext.Log property.
If this advice isn't helpful, please send me (support * devart * com) the script of the procedure, I'll look into it.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby AndreyR » Tue 08 Dec 2009 10:14

The problem is addressed in the latest build.
Please let me know if something goes wrong.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for Oracle