Page 1 of 1

Trouble calling stored functions returning rows

Posted: Tue 04 May 2010 17:21
by Tiago_G
Hello,

When i execute any stored function that returns rows i get an exception of type PgSqlException with the message 'cursor "1" does not exist'
(where 1 is the value of the first parameter passed to the function).

Stored functions that return system types (int, ..) don't have any problems.

This has only happened since upgrading to 4.90.

example of a mapping:

[Function(Name=@"ns.dostuff")]
public System.Data.Linq.ISingleResult DoStuff([Parameter(Name="param1", DbType="int4")] System.Nullable param1, [Parameter(Name="param2", DbType="int4")] System.Nullable param2)
{
return ((System.Data.Linq.ISingleResult)(this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), param1, param2).ReturnValue));
}

and SQL function:

CREATE FUNCTION ns.dostuff(param1 integer, param2 integer)
RETURNS ns.sometype AS..
....

If you need any further details/examples i will gladly provide them.

Thanks

Regards,
Tiago

Posted: Thu 06 May 2010 15:39
by AndreyR
Could you please send me (support * devart * com, subject "LINQ: Cursor does not exist") the script of the procedure including the objects the procedure use?