-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransaction.vb
More file actions
37 lines (32 loc) · 844 Bytes
/
Transaction.vb
File metadata and controls
37 lines (32 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Imports System.Data.Common
Imports System.Data.SqlClient
Public Class Transaction
Inherits Databasic.Transaction
Public Overrides Property Instance As DbTransaction
Get
Return Me._instance
End Get
Set(value As DbTransaction)
Me._instance = value
End Set
End Property
Private _instance As SqlTransaction
Public Shadows Sub Rollback(transactionName As String)
Try
Me._instance.Rollback(transactionName)
Me.ConnectionWrapper.OpenedTransaction = Nothing
Catch ex As Exception
Me.ConnectionWrapper.OpenedTransaction = Nothing
Throw ex
End Try
End Sub
Public Sub Save(savePointName As String)
Try
Me._instance.Save(savePointName)
Me.ConnectionWrapper.OpenedTransaction = Nothing
Catch ex As Exception
Me.ConnectionWrapper.OpenedTransaction = Nothing
Throw ex
End Try
End Sub
End Class