运行在C#中的Oracle存储的特效 [英] Running Oracle stored procs from C#
本文介绍了运行在C#中的Oracle存储的特效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
一个初学者的问题: 我在Oracle数据库中存储的过程(只是一个过程,没有任何包装):
CREATE OR REPLACE程序FII_DBO.CLEAR_UNIT_TEST_PRODUCT
IS
开始
...
END CLEAR_UNIT_TEST_PRODUCT;
和它工作正常蟾蜍。然而,当我尝试从C#运行它抱怨:
System.Data.OracleClient.OracleException:ORA-06550:第1行,第7列:
PLS-00201:标识符CLEAR_UNIT_TEST_PRODUCT必须申报
ORA-06550:第1行,第7列:
PL / SQL:语句被忽略
有关C#code:
命令=新的OracleCommand();
Command.CommandText = PROCEDURENAME;
Command.CommandType = CommandType.StoredProcedure;
Command.Connection =连接;
Command.ExecuteNonQuery();
解决方案
请检查您的.NET应用程序连接与具有权限的Oracle用户来执行存储过程。
A beginner question: I have a stored proc (just a procedure, without any packages) in the Oracle Database:
CREATE OR REPLACE procedure FII_DBO.CLEAR_UNIT_TEST_PRODUCT
IS
BEGIN
...
END CLEAR_UNIT_TEST_PRODUCT;
and it works fine in TOAD. However, when I try to run it from C# it complains:
System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
PLS-00201: identifier 'CLEAR_UNIT_TEST_PRODUCT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
relevant C# code:
Command = new OracleCommand();
Command.CommandText = procedureName;
Command.CommandType = CommandType.StoredProcedure;
Command.Connection = connection;
Command.ExecuteNonQuery();
解决方案
Check that the Oracle user that your .NET application is connecting with has permissions to execute the stored procedure.
这篇关于运行在C#中的Oracle存储的特效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文