RS出错
rs.Open "select * from jsr where bh='" + Grid1.TextMatrix(Grid1.row, 0) + "'", main.connection,adOpenKeyset,adLockPessimisticrs.Fields("bh") = .TextMatrix(i, 0)
rs.Fields("mc") = .TextMatrix(i, 1)
rs.Fields("lxdh") = .TextMatrix(i, 2)
If rs.State = adStateOpen Then
rs.Close
End If
在此环境中不允许操作,,,请高手帮忙一下 --------------------编程问答-------------------- 修改前应该加上 rs.edit, 修改后 rs.update
如果是添加,rs.add
--------------------编程问答--------------------
'直接用UPDATE语句来实现更新记录--------------------编程问答-------------------- http://download.csdn.net/detail/veron_04/1644211
strsql=" UPDATE jsr SET bh='"& .textmatrix(i,0) &"',mc='"& .textmatrix(i,1) &"',lxdh='"& .textmatrix(i,2) &"' WHERE bh='"& grid1.textmatrix(grid1.row,0) &"'"
main.connection.execute strsql
支持!
--------------------编程问答-------------------- http://download.csdn.net/detail/veron_04/1644211 --------------------编程问答-------------------- rs.Open "select * from jsr where bh='" + Grid1.TextMatrix(Grid1.row, 0) + "'", main.connection,adOpenKeyset,adLockPessimistic
for i=1 to grid1.rows
rs.addnew
rs.Fields("bh") = .TextMatrix(i, 0)
rs.Fields("mc") = .TextMatrix(i, 1)
rs.Fields("lxdh") = .TextMatrix(i, 2)
next
rs.Update
rs.close
--------------------编程问答--------------------
补充:VB , 数据库(包含打印,安装,报表)