このコードでは、.commit() の後の SomeFunction() はトランザクションの一部と見なされますか? 何かが爆発した場合、ロールバックしますか?動的レコードが挿入された後にさらに処理を行う必要があり、すべてを 1 つの大きな塊で処理したいと考えています。
command.Transaction = transaction
Try
command.CommandText = _
"Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')"
command.ExecuteNonQuery()
transaction.Commit()
'do a function call here
SomeFunction()
Catch ex As Exception
transaction.Rollback()
End Try