How to close the connection after set Transation to Nothing or Commit/Rollback
- by user1957271
I develop the DAL class for db operation
Public Sub StartTransaction()
Dim objConnection As SqlConnection = EstablishConnection()
objConnection.Open()
Me.Transaction = objConnection.BeginTransaction()
End Sub
Public Sub CommitTransaction()
Me.Transaction.Commit()
End Sub
Public Sub RollBackTransaction()
Me.Transaction.Rollback()
End Sub
after start the transaction when we commit or rollback and set transaction object to nothing it dont close the connection attach with this transaction
how I close the Connection attach to this transaction???