c#调用存储过程
2021-03-30 05:26
标签:mos ext store command exe RoCE arc acl char 创建表 创建不带参的存储过程 c#调用存储过程 c#调用存储过程 标签:mos ext store command exe RoCE arc acl char 原文地址:https://www.cnblogs.com/bsdbqling/p/9282985.htmlcreate table test
(ID number,
NAME varchar2(10),
SEX varchar2(4),
AGE number,
ADDRESS varchar2(200)
);
create or replace procedure proc1
is
begin insert into test(ID,NAME,SEX,AGE) values
(1,‘moses‘,‘man‘,25);
commit;
end;
protected void Button2_Click(object sender, EventArgs e)
{
String oc = ConfigurationManager.ConnectionStrings["conn"].ToString();
OracleConnection conn = new OracleConnection(oc);
conn.Open();
OracleCommand orm = conn.CreateCommand();
orm.CommandType = CommandType.StoredProcedure;
orm.CommandText = "proc1";
orm.ExecuteNonQuery();
conn.Close();
}
上一篇:c# 编码风格