Public G_objRdoCon As rdoConnection
Public G_objRdoEnv As rdoEnvironment
begin
on error goto Err
连接数据库
'事务开始
G_objRdoCon.BeginTrans
sSql="Update yourtable1 set A='a' where b='xxx'";
G_objRdoCon.Execute sSql
sSql="Insert into yourtable2 values('a','b','c');
G_objRdoCon.Execute sSql
G_objRdoCon.CommitTrans '事务提交
exit sub
Err:
G_objRdoCon.RollbackTrans '事务回滚
end sub