Dapper-调用Oracle schema.package.function [英] Dapper - call Oracle schema.package.function

查看:220
本文介绍了Dapper-调用Oracle schema.package.function的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用Dapper调用Oracle存储过程和函数,但是在包内部调用函数时遇到问题.

I can call Oracle stored procedure and function with Dapper, but I have problems with calling a function inside of package.

我的错误是:

ORA-06550: line 1, column 39:
PLS-00302: component 'funct' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

我的代码是:

using (IDbConnection cn = Connection)
            {
                var a = cn.ExecuteReader(oracleFunctionName, fnParameters, commandType: CommandType.StoredProcedure);

            }

我的参数还可以,但是Dapper似乎无法解析ORacle函数的命名方式schema.package.function有什么想法吗?

My parameters are ok, but it seems that Dapper can't resolve ORacle function naming schema.package.function Any idea?

推荐答案

我解决了这个问题,这是一个愚蠢的错误.

I solved this, it was a stupid mistake.

如果您在尝试调用存储过程时收到ORA-06550错误,则有两种可能性:

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.

这篇关于Dapper-调用Oracle schema.package.function的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆