Jangogo :
在线版,SQL 数据库,进销存模块,单据(销售单或者采购单)填入了实收或者实付金额后,保存单据报错:不能定位更新行,不能保存单据。
问题只出现在SQL Server数据库,Access版本正常
问题已经解决(by Jangogo 2010-8-30)
原因SQL Server 不支持这种做法,更改代码后OK
rs.open "select * from calockitem where id=0",cn,1,3
rs.addnew
rs("Cashier_ID")=ciid
rs("invoice_id")=i1
rs("ctype")=1
rs("Group_ID")=0
rs.update
ciid=rs("id")
''以下两句SQL Server不兼容,改用execute sql
''rs("Group_ID")=rs("id")
''rs.update
rs.close
cn.execute "update calockitem set Group_ID=id where id=" & ciid
''当记录集插入新的值后,记录集并没有定位到新增加的行,而是重新加载了id=0的行,
''因此会导致软件报错任务记录:
文档中心bug
