ASP中,大家看一下我这个事务,Etoid和toid是否返回的结果会是百分百得准确的呢?
zhlym 2006-06-07 07:39:09 ASP中,大家看一下我这个事务,Etoid和toid是否返回的结果会是百分百得准确的呢?
conn.open connstr '打开数据库的链接
Etoid=0
toid=0
on error resume next
conn.BeginTrans
for i = 1 to 200
sql="这里是传一些参数给MSSQL2000存储过程,存储过程里为Inser语句"
conn.execute(sql)
if conn.Errors.Count>0 then
conn.Errors.Clear
conn.RollBackTrans
Etoid = Etoid + 1
else
toid = toid+1
end if
next
conn.CommitTrans