我一般在数据库中用的这样的操作
下面是代码基本结构,你修改一下就可以了
cnn.Open()
cmd = cnn.CreateCommand
Dim myTrans As OleDb.OleDbTransaction
myTrans = cnn.BeginTransaction()
cmd.Transaction = myTrans
try
'成功
mytrans.commit
catch ex as exception
mytrans.rollback
end try
cnn.close
[此贴子已经被作者于2006-11-17 8:41:24编辑过]