存储过程参数问题!!! ORACLE数据库中的存储过程,输入参数很长大于4000,所以我用了LONG型,那么前台调存储过程时对应的参数应该是什么啊?我前台程序用的是VB.NET.谢谢大家了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 OracleType.LongVarChar或OracleType.LongRaw //插入long类型字段值,这种方法只能用于中文字符集 string connString = ConfigurationSettings.AppSettings["OracleString"].ToString(); try { OracleConnection conn = new OracleConnection(connString); conn.Open(); OracleCommand cmd = new OracleCommand("Select * From news", conn); string strSQL=""; strSQL="INSERT INTO news(classid,title,details,publishdate,author) VALUES ("; strSQL+=ddlNewsClass.SelectedValue.ToString().Trim()+","; strSQL+="'"+txtTitle.Text.ToString().Trim()+"',"; strSQL+=":P_Value,"; strSQL+="'"+txtPublishdate.Text.ToString().Trim()+"','"+txtAuthor.Text.ToString().Trim()+"')"; cmd.CommandText = strSQL; cmd.Parameters.Add("P_Value", this.HtmlEditor.Text); cmd.ExecuteNonQuery(); conn.Close(); lblInfo.Text="当前信息已成功发布。"; lblInfo.Visible=true; } catch(Exception ex) { Response.Write (ex.Message.ToString()); } 问个算去年同期值的sql oracla的更新问题 oracle中如何批量更新某列数据 请教各位一个ORACLR-RAC问题 关于oracle字符编码的问题 有谁能告诉我“ORA-03113:通信通道的文件结束”是什么问题。 內存參數修改的問題 insert递增已经实现,delete递减怎么实现,或这说是递增字段怎么实现变小? SQL 高手速进 oracle安装问题,有人知道吗?? Oracle occi ORACLE 的JOB每天晚上不运行
OracleType.LongRaw
string connString = ConfigurationSettings.AppSettings["OracleString"].ToString();
try
{
OracleConnection conn = new OracleConnection(connString);
conn.Open();
OracleCommand cmd = new OracleCommand("Select * From news", conn);
string strSQL="";
strSQL="INSERT INTO news(classid,title,details,publishdate,author) VALUES (";
strSQL+=ddlNewsClass.SelectedValue.ToString().Trim()+",";
strSQL+="'"+txtTitle.Text.ToString().Trim()+"',";
strSQL+=":P_Value,";
strSQL+="'"+txtPublishdate.Text.ToString().Trim()+"','"+txtAuthor.Text.ToString().Trim()+"')";
cmd.CommandText = strSQL;
cmd.Parameters.Add("P_Value", this.HtmlEditor.Text);
cmd.ExecuteNonQuery();
conn.Close();
lblInfo.Text="当前信息已成功发布。";
lblInfo.Visible=true;
}
catch(Exception ex)
{
Response.Write (ex.Message.ToString());
}