Hi,
I'm trying to create a function import that return scalar value (Int32) and i received this error:
Error 2054: A FunctionImport is mapped to a storage function 'MyModel.Store.Function1' that can be composed. Only stored procedure functions may be mapped.
I have a same function that return a cursor and it works ok
what can i do?
________
Function imports
Function imports
Last edited by ies on Thu 24 Feb 2011 06:05, edited 1 time in total.
One of the possible solutions for this problem is to use the following code:
Code: Select all
using (Entities db = new Entities()){
ObjectQuery query = new ObjectQuery("Model.Store.GetDecimal(@D)", db);
query.Parameters.Add(new ObjectParameter("D", 1m));
decimal result = query.ToList().FirstOrDefault();
}
Hi andrey,
I'm having a problem. I have a Package (PCK_1) with a function
FUNCTION f_p (
uno IN NUMBER,
dos IN NUMBER,
tres IN VARCHAR2
)
RETURN NUMBER
IS
BEGIN
RETURN 14;
END;
i try to call this function using ef but i have a error (ORA-00904: \"PCK_1_F_P\": identificador no v?lido):
using (Entities db = new Entities())
{
ObjectQuery query = new ObjectQuery("Model.Store.PCK_1_F_P(@a,@b,@c)", context);
query.Parameters.Add(new ObjectParameter("a", Convert.ToDecimal(1)));
query.Parameters.Add(new ObjectParameter("b", Convert.ToDecimal(2)));
query.Parameters.Add(new ObjectParameter("c", Convert.ToDecimal("1")));
decimal result = query.ToList().FirstOrDefault();
}
what is wrong?
________
I'm having a problem. I have a Package (PCK_1) with a function
FUNCTION f_p (
uno IN NUMBER,
dos IN NUMBER,
tres IN VARCHAR2
)
RETURN NUMBER
IS
BEGIN
RETURN 14;
END;
i try to call this function using ef but i have a error (ORA-00904: \"PCK_1_F_P\": identificador no v?lido):
using (Entities db = new Entities())
{
ObjectQuery query = new ObjectQuery("Model.Store.PCK_1_F_P(@a,@b,@c)", context);
query.Parameters.Add(new ObjectParameter("a", Convert.ToDecimal(1)));
query.Parameters.Add(new ObjectParameter("b", Convert.ToDecimal(2)));
query.Parameters.Add(new ObjectParameter("c", Convert.ToDecimal("1")));
decimal result = query.ToList().FirstOrDefault();
}
what is wrong?
________
Last edited by ies on Thu 24 Feb 2011 06:05, edited 1 time in total.
I Andrey,
I have install de latest version of connector (5.20.29), and i try to launch function import buy i'm having the same error
ORA-00904: \"PCK_1_F_P\": identificador no v?lido
what can i do?
thanks,
________
Glass Pipe Pictures
I have install de latest version of connector (5.20.29), and i try to launch function import buy i'm having the same error
ORA-00904: \"PCK_1_F_P\": identificador no v?lido
what can i do?
thanks,
________
Glass Pipe Pictures
Last edited by ies on Thu 24 Feb 2011 06:05, edited 1 time in total.