save.asp:
for i=1 to request.form("id").count
id = request("id")(i)
sql = "update tabname set colname = 'content' where id = "&id&""
cn.execute(sql)
next
楼上这位朋友的方法固然可以实现,但是太耗费资源,除非你用批量更新。
我想对ready说的是,楼上几位老兄说的没有错,是你理解错了。说明如下:
并不是一次SQL语句的执行,只能有一个动作,例如:我要进行两条纪录的更新,我可以把两条更新SQl语句写在一起,然后让ADO提交执行,数据库就会按顺序执行两条语句
Update tabname set colname1='xxx',colname2='yyy'where ID=1 Update tabname set colname1='zzz' where ID=2