问题
I can call Oracle stored procedure and function with Dapper, but I have problems with calling a function inside of package.
My error is:
ORA-06550: line 1, column 39:
PLS-00302: component 'funct' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
My code is :
using (IDbConnection cn = Connection)
{
var a = cn.ExecuteReader(oracleFunctionName, fnParameters, commandType: CommandType.StoredProcedure);
}
My parameters are ok, but it seems that Dapper can't resolve ORacle function naming schema.package.function
Any idea?
回答1:
I solved this, it was a stupid mistake.
If you are receiving an ORA-06550 error when you try to invoke the stored procedure, then there are two possibilities:
you are invoking the procedure from a schema other than schema which does not have the appropriate permissions granted to allow it to invoke another user's procedure.
the procedure has not been created in the "your" schema.
来源:https://stackoverflow.com/questions/27620159/dapper-call-oracle-schema-package-function