Dapper - call Oracle schema.package.function

若如初见. 提交于 2019-12-23 05:01:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!