http://www.microsoft.com/china/MSDN/library/data/dataAccess/DMSDNorsps.mspx?mfr=true
是微软的实例及应用。讲解的不错。CREATE OR REPLACE PROCEDURE InfoManager.COUNT_SysFunction
(
reccount OUT NUMBER
)
IS
BEGIN
SELECT COUNT(*) INTO reccount
FROM Infomanager.Sysfunction;
END COUNT_SysFunction;
CREATE OR REPLACE PROCEDURE InfoManager.UPD_SYSFUNCTION
(
func_id char
)
IS
BEGIN
update infomanager.sysfunction
set 标志 = 0
WHERE 功能编号 = func_id;
END UPD_SYSFUNCTION;
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OracleClient;
using HHSCInfor.App_Code.Database;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AbsDB conn = DBConn.GetDBConn();
OracleCommand cmd = new OracleCommand();
cmd.CommandText = "UPD_SYSFUNCTION";
OracleParameter para1 = new OracleParameter("func_id", 4);
OracleParameter[] paraValue ={ para1};
int resultFlag = conn.ExeSql(CommandType.StoredProcedure, cmd.CommandText, paraValue);
Label1.Text = resultFlag.ToString();}
}
CREATE OR REPLACE PROCEDURE UPD_SYSFUNCTION
(
func_id char,
flag char
)
IS
BEGIN
update infomanager.sysfunction
set 标志 = flag
WHERE 功能编号 = func_id;
END UPD_SYSFUNCTION;
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OracleClient;
using HHSCInfor.App_Code.Database;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AbsDB conn = DBConn.GetDBConn();
OracleCommand cmd = new OracleCommand();
cmd.CommandText = "UPD_SYSFUNCTION";
OracleParameter para1 = new OracleParameter("func_id", 4);
OracleParameter para2 = new OracleParameter("flag", 1);
OracleParameter[] paraValue ={ para1, para2 };
int resultFlag = conn.ExeSql(CommandType.StoredProcedure, cmd.CommandText, paraValue);
Label1.Text = resultFlag.ToString(); conn.Close();
}
}