急!!!Length cannot be less than zero
本帖最后由 tangxiaoming 于 2012-11-05 14:27:39 编辑
Error:Error executing query Name 'UpdateOrder' query Sql '
Update co_sched_o_detail Set m_order_qty = :0 , m_free_goods_qty = :1 , m_reason_code = :2 , action_id = :3 ,action_time = :4 where fid = :5 and order_number = :6 and item_code = :7 and sub_code = :8 and store = :9
,parameter_Value::param0 0 :param1 0 :param2 :param3 sy31 :param4 11/5/2012 1:03:39 PM :param5 71BEE16C7E12434AAD74B914E3442344 :param6 581 :param7 514024 :param8 001 :param9 037JX
,parameter_DbType::param0 String :param1 String :param2 String :param3 String :param4 DateTime :param5 String :param6 String :param7 String :param8 String :param9 String
' for object. Cause: Length cannot be less than zero.
Parameter name: length
Message:Length cannot be less than zero.
Parameter name: length
Source:mscorlib
Method:System.String InternalSubStringWithChecks(Int32, Int32, Boolean)
Stack_Trace: at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at System.Text.StringBuilder.ToString(Int32 startIndex, Int32 length)
at IBatisNet.DataMapper.Commands.DefaultPreparedCommand.ApplyParameterMap(IDalSession session, IDbCommand command, RequestScope request, IStatement statement, Object parameterObject)
at IBatisNet.DataMapper.Commands.DefaultPreparedCommand.Create(RequestScope request, IDalSession session, IStatement statement, Object parameterObject)
at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteUpdate(IDalSession session, Object parameterObject)
at IBatisNet.DataMapper.SqlMapper.Update(String statementName, Object parameterObject)
at co.Dao.BaseSqlMapDao.ExecuteUpdate(String statementName, Object parameterObject) in E:\work\work3\Source\co.Dao\BaseSqlMapDao.cs:line 263
有那位大哥大姐知道这是什么原因造成的吗?
------最佳解决方案--------------------断点跟踪下,输出查看下SQL语句
从错误提示,是参数长度为0的错误