报错如下:CLOB and NCLOB require even number of bytes for this argument. Parameter name: count
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: CLOB and NCLOB require even number of bytes for this argument. Parameter name: countSource Error: byte[] tempbuff = System.Text.Encoding.Default.GetBytes(Request["Content"].ToString());
//创建临时lob 代码略
...
Line 138: OracleLob tempLob = (OracleLob)cmd.Parameters[0].Value;
Line 139: tempLob.BeginBatch(OracleLobOpenMode.ReadWrite);
Line 140: tempLob.Write(tempbuff,0,tempbuff.Length);
Line 141: tempLob.EndBatch();
Line 142: cmd.Parameters.Clear();
140行出错.
请教..
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: CLOB and NCLOB require even number of bytes for this argument. Parameter name: countSource Error: byte[] tempbuff = System.Text.Encoding.Default.GetBytes(Request["Content"].ToString());
//创建临时lob 代码略
...
Line 138: OracleLob tempLob = (OracleLob)cmd.Parameters[0].Value;
Line 139: tempLob.BeginBatch(OracleLobOpenMode.ReadWrite);
Line 140: tempLob.Write(tempbuff,0,tempbuff.Length);
Line 141: tempLob.EndBatch();
Line 142: cmd.Parameters.Clear();
140行出错.
请教..
解决方案 »
- .cs 自动加载了using System.linq 等,要怎么设定加载哪些
- 如何写JS语句
- 我想知道在asp.net 中不用ajax技术怎么实现局部的刷新的效果
- 如何实现根据IP获取当地天气预报,望详细指教
- 重构的困惑?
- Asp.net(C#) 与 vb的区别问题
- 2级联动的下拉框,在代码if(IsValid)无法验证通过,有其他的办法验证吗?
- 一个页面的Page_Load事件执行两次,
- 我暂时有4个问题请教大虾!在线等待-------VB.NET
- OA中想加入列车时刻查询功能,不知哪里有此类数据库?民航的呢?
- 救命!!!!!!!!!!!!!!!!!!!!!!!!!!!!111111
- 又有分抢了!
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();