本文介绍了如何在Oracle中创建表以及如何在oracle中编写存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好先生我想用存储过程插入我的数据我是oracle的新手我在sql 2008工作但现在在oracle我面临的问题是创建一个表以及在oracle中编写存储过程。 请帮帮我。 我的代码在这里的逻辑
#region保存课程 public int SavingCourse(HybridDictionary hd) { 尝试 { DbCommand dbcom = db.GetStoredProcCommand( SP_SAVE ); // db.AddInParameter(dbcom,@ Id,DbType.Int64,hd [Id ]); db.AddInParameter(dbcom, @ Name, DbType。 String ,hd [ 名称]); db.AddInParameter(dbcom, @ Age,DbType。 Int64 ,hd [ 年龄]); db.AddInParameter(dbcom, @ Password,DbType。 String ,hd [ 密码]); // db.AddInParameter(dbcom,@ FirstInstallment,DbType.Int64,hd [FirstInstallment ]); // db.AddInParameter(dbcom,@ SecondInstallment,DbType。 Int64,hd [SecondInstallment]); db.ExecuteNonQuery(dbcom); return 1 ; } catch (例外错误) { return 0 ; } }及其我的windows窗体代码 i我正在使用混合词典
私人 void btnsubmit_Click( object sender,EventArgs e) { InsertData(); lo.SavingCourse(hd); } public void InsertData() { // hd [Id] = 0; hd [ 名称] = txtname.Text; hd [ 年龄] = txtage.Text; hd [ 密码] = txtcreatpwd.Text; }解决方案
这是一个可能对你有帮助的链接。 forums.oracle/message/4568433 [ ^ ] 请参阅此链接。 www.c-sharpcorner/UploadFile/john_charles/CallingOraclestoredproceduresfromMicrosoftdotNET06222007142805PM/CallingOraclestoredproceduresfromMicrosoftdotNET.aspx [ ^ ]
hello sir i want to insert my data using store procedure i am new in oracle i was working in sql 2008 but now in oracle i am facing the problem to create a table as well as writing store procedure in oracle. please help me. my code here in class Logic
#region "Save Course" public int SavingCourse(HybridDictionary hd) { try { DbCommand dbcom = db.GetStoredProcCommand("SP_SAVE"); //db.AddInParameter(dbcom, "@Id", DbType.Int64, hd["Id"]); db.AddInParameter(dbcom, "@Name", DbType.String, hd["Name"]); db.AddInParameter(dbcom, "@Age", DbType.Int64, hd["Age"]); db.AddInParameter(dbcom, "@Password", DbType.String, hd["Password"]); //db.AddInParameter(dbcom, "@FirstInstallment", DbType.Int64, hd["FirstInstallment"]); //db.AddInParameter(dbcom, "@SecondInstallment", DbType.Int64, hd["SecondInstallment"]); db.ExecuteNonQuery(dbcom); return 1; } catch (Exception err) { return 0; } }and its my code of windows form i am using hybrid dictionary
private void btnsubmit_Click(object sender, EventArgs e) { InsertData(); lo.SavingCourse(hd); } public void InsertData() { //hd["Id"] = 0; hd["Name"] = txtname.Text; hd["Age"] = txtage.Text; hd["Password"] = txtcreatpwd.Text; } 解决方案 Here is a link that might help you. forums.oracle/message/4568433[^] Refer also this link. www.c-sharpcorner/UploadFile/john_charles/CallingOraclestoredproceduresfromMicrosoftdotNET06222007142805PM/CallingOraclestoredproceduresfromMicrosoftdotNET.aspx[^]更多推荐
如何在Oracle中创建表以及如何在oracle中编写存储过程
发布评论