请教:关于recordset的edit和update问题
有如下的recordset
dim ftemp as single
dim rs as dao.recordset
set rs = currentdb.openrecordset("select hId, hID1, hID2 from mytable", dbopendynaset, dbinconsistent)
ftemp = ...
需要对rs进行编辑和更新的时候
以下的写法1 和 写法2是否正确,为什么?最佳的写法应该是怎样?
'写法1
rs.edit
do until rs.eof
rs!hID = ftemp
rs.movenext
loop
rs.update
'写法2
rs.edit
do until rs.eof
rs!hID = ftemp
rs.update
rs.movenext
loop