使用C#mo_global.set_policy_context的Oracle应用程序策略 [英] Oracle apps policy with C# mo_global.set_policy_context
本文介绍了使用C#mo_global.set_policy_context的Oracle应用程序策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何允许策略在报表查看器中使用Oracle视图(应用程序)报表(RDLC)。
这样的事情:
How to allow the policy to use Oracle Views (Applications) before report (RDLC) in Report Viewer.
Something like this:
SELECT AMOUNT_APPLICABLE_TO_DISCOUNT From
AP_INVOICES_V
我需要在使用此选择语句之前调用此PL / SQL:
I need to call this PL/SQL Before Using this select statement:
Begin
mo_global.set_policy_context('S', 90);
End;
所以我在页面加载时这样做了在将SQL数据源设置为报告之前:
so I did this on page load before setting the SQL Data source to the report:
if (!IsPostBack)
{
db.connectODB();
OracleCommand ora_cmd = new OracleCommand("mo_global.set_policy_context", db.con);
ora_cmd.BindByName = true;
ora_cmd.CommandType = CommandType.StoredProcedure;
ora_cmd.Parameters.Add("P_ACCESS_MODE", 'S');
ora_cmd.Parameters.Add("P_ORG_ID", 90);
ora_cmd.ExecuteNonQuery();
}
但仍然没有检索到数据。
But still no data retrieved.
推荐答案
这篇关于使用C#mo_global.set_policy_context的Oracle应用程序策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文