[Quote=引用 11 楼 goeastward 的回复:]
还想多问一下,你当时是不是大部分情况下能insert进去,但某一、两次丢失了?
抑或数量一共几次,全部都是丢失?
[/Quote]
太遥远的事情不记得了。这样吧,你在判断的时候加多一个条件,看看什么情况:
if conn.errors.count>0 or err then
rollback.........
else
conmitt..........
end if
因为只是两条Insert,所以更新操作没有使用存储过程:
on error resume next
conn.BeginTrans
conn.execute("insert into tbla(aa,bb) values('aa','bb')")
conn.execute("insert into tblb(cc,dd) values('cc','dd')")
if conn.Errors.Count>0 then
conn.Errors.Clear
conn.RollBackTrans
response.write "有错误"
else
response.write "无错误"
Conn.CommitTrans
end if