比如是SqlServer-2000和话
con.Open();
string str = "insert into hst_zd_sq_fy values (@LCID,@BZ)";
SqlCommand cmd = new SqlCommand (str,con);
cmd.Parameters.Add ("@LCID",SqlDBType.VarChar);
cmd.Parameters.Add ("@BZ",SqlDBType.VarChar);cmd.Parameters["@LCID"].Value = TextBox1.Text;
cmd.Parameters["@XH"].Value = TextBox2.Text;cmd.ExecuteNonQuery();而现在换成Oracle数据库了,我应该怎么做啊!!!!各位高手帮帮忙了!!!
con.Open();
string str = "insert into hst_zd_sq_fy values (@LCID,@BZ)";
SqlCommand cmd = new SqlCommand (str,con);
cmd.Parameters.Add ("@LCID",SqlDBType.VarChar);
cmd.Parameters.Add ("@BZ",SqlDBType.VarChar);cmd.Parameters["@LCID"].Value = TextBox1.Text;
cmd.Parameters["@XH"].Value = TextBox2.Text;cmd.ExecuteNonQuery();而现在换成Oracle数据库了,我应该怎么做啊!!!!各位高手帮帮忙了!!!
解决方案 »
- 使用windows窗体模拟一次post方式的服务器申请,如何实现
- .net 与汇编有什么关系?
- GridView中用OnClientClick方法打开小窗口
- 关于vs2008的问题
- 在母版页无法正确判断是否登录的问题
- gridview中的超连接HyperLinkField如何设置从新窗口打开
- 页面的模式对话框
- 我想了数据结构里面的线性表,栈和队列,数组和广义表,树(二叉树,哈夫曼树),图,排序(插入排序,冒泡排序,快速排序,归并排序,外部排序),查找等这些在ASP.net应用!请你在线时留言给我,好吗?谢谢
- vs.net2005哪个版本才是正式中文版。。Team Suite又是什么版本。。?
- 高分求解导出WORD的问题,我的代码有错吗?
- 我写的一个聊天室的程序老是弹出一个对话框!不知道什么原因.
- datagrid相关...高分求救..急..
然后就跟上面的差不多了。
"from securityobject where fatherid=:faid order by securityobjid",conn);
comm.Parameters.Add(":faid",OracleType.Number,10).Value=upid;
fatherid=:faid 可识别是一个参数.你就当和SQLSERVER @ID 参数那样理解就行.
try
{
OracleCommand cmd = new OracleCommand();
cmd.Connection=this.oracleConnection1;
cmd.CommandText="insert into lsa_table (iidd,EDITTEMPLATE2,HTMLTEMPLATE)values(get_guid(sys_guid()),:aa,:bb)";
cmd.Parameters.Add("aa",OracleType.Clob,System.Text.Encoding.Default.GetByteCount(this.textBox1.Text)).Value=this.textBox1.Text;
cmd.Parameters.Add("bb",OracleType.Clob,System.Text.Encoding.Default.GetByteCount(this.textBox2.Text)).Value=this.textBox2.Text;cmd.ExecuteNonQuery();
}
catch(System.Exception ex)
{
MessageBox.Show(ex.ToString());
}
this.oracleConnection1.Close();