各位高手大家好:
我初学.net
我用的是.net2005 和oracle10g数据库
用的是formview 控件
protected void FInsertdetail_ItemInserting(object sender, FormViewInsertEventArgs e)
{
int temp;
temp = 4;
Sqldetail.InsertParameters[0].DefaultValue = temp.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
FInsertdetail.ChangeMode(FormViewMode.Insert);
}
数据源中插入语句:InsertCommand="insert into acct.infusion_works (serial_no) values(:serial_temp)"
数据库中serial_no 的类型是number型
但是执行后出现以下错误:
ORA-01036: 非法的变量名/编号 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.OracleClient.OracleException: ORA-01036: 非法的变量名/编号
源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。
我初学.net
我用的是.net2005 和oracle10g数据库
用的是formview 控件
protected void FInsertdetail_ItemInserting(object sender, FormViewInsertEventArgs e)
{
int temp;
temp = 4;
Sqldetail.InsertParameters[0].DefaultValue = temp.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
FInsertdetail.ChangeMode(FormViewMode.Insert);
}
数据源中插入语句:InsertCommand="insert into acct.infusion_works (serial_no) values(:serial_temp)"
数据库中serial_no 的类型是number型
但是执行后出现以下错误:
ORA-01036: 非法的变量名/编号 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.OracleClient.OracleException: ORA-01036: 非法的变量名/编号
源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。
Action: Make sure that the variable being bound is in the sql statement.
看看你倒底传入了个什么参数嘛
我是新手,请您详细的说下如何调试及解决?