PLS-00302:告诉我我的存储过程未声明
这是堆栈中发生错误的位置:
public static IKSList<DataParameter> Search(int categoryID, int departmentID, string title)
{
Database db = new Database(DatabaseConfig.CommonConnString, DatabaseConfig.CommonSchemaOwner, "pkg_data_params_new", "spdata_params_search");
db.AddParameter("category_id", categoryID);
db.AddParameter("department_id", departmentID);
db.AddParameter("title", title, title.Length);
DataView temp = db.Execute_DataView();
IKSList<DataParameter> dps = new IKSList<DataParameter>();
foreach (DataRow dr in temp.Table.Rows)
{
DataParameter dp = new DataParameter();
dp.Load(dr);
dps.Add(dp);
}
return dps;
}
这是错误文本:
ORA-06550: line 1, column 38:
PLS-00302: component 'SPDATA_PARAMS_SEARCH' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
描述:执行期间发生未处理的异常 当前的网络请求。请查看堆栈跟踪以了解更多信息 有关错误及其在代码中的来源的信息。
异常详细信息:System.Data.OracleClient.OracleException: ORA-06550: 第 1 行,第 38 列:PLS-00302:组件 必须声明“SPDATA_PARAMS_SEARCH”ORA-06550:第 1 行,第 7 列: PL/SQL:语句被忽略
源错误:
Line 161: db.AddParameter("title", title, title.Length);
Line 162:
Line 163: DataView temp = db.Execute_DataView();
Line 164:
Line 165: IKSList<DataParameter> dps = new IKSList<DataParameter>();
我的 web.config 指向正确的位置和所有内容,所以我不知道它来自哪里。
Here is where the error is occurring in the stack:
public static IKSList<DataParameter> Search(int categoryID, int departmentID, string title)
{
Database db = new Database(DatabaseConfig.CommonConnString, DatabaseConfig.CommonSchemaOwner, "pkg_data_params_new", "spdata_params_search");
db.AddParameter("category_id", categoryID);
db.AddParameter("department_id", departmentID);
db.AddParameter("title", title, title.Length);
DataView temp = db.Execute_DataView();
IKSList<DataParameter> dps = new IKSList<DataParameter>();
foreach (DataRow dr in temp.Table.Rows)
{
DataParameter dp = new DataParameter();
dp.Load(dr);
dps.Add(dp);
}
return dps;
}
And here is the error text:
ORA-06550: line 1, column 38:
PLS-00302: component 'SPDATA_PARAMS_SEARCH' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.Exception Details: System.Data.OracleClient.OracleException:
ORA-06550: line 1, column 38: PLS-00302: component
'SPDATA_PARAMS_SEARCH' must be declared ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Source Error:
Line 161: db.AddParameter("title", title, title.Length);
Line 162:
Line 163: DataView temp = db.Execute_DataView();
Line 164:
Line 165: IKSList<DataParameter> dps = new IKSList<DataParameter>();
My web.config is pointing to the correct place and everything so I don't know where this is coming from.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先确保调用该过程的用户对该过程具有执行权限,其次确保调用该过程的用户可以直接使用 schemaname.procedurename 或 synonymname.procedure 名称查看该过程,同义词可以是 public 或私人的。
希望有帮助
firstly make sure that the user that calls the procedure has execute rights on the procedure, secondly make sure that the user that calls the procedure can see the procedure either directly using schemaname.procedurename or synonymname.procedure name, the synonym can be either public or private.
hope it helps
janbo的回答很到位,给他点赞。这是一个放入数据库部署中的脚本,以确保这种情况不会再次发生:
The answer by janbo is spot on, give him an upvote. Here is a script to put into your DB Deployments to make sure this doesn't happen again: