hi, I have to do a project using daab transaction using Microsoft visual studio(vb).
is there any website or book anyone can recommend whereby they give step by step or detailed way on how bout doing it???
I am having troubles wif my code, the bolded part has an error and i have no idea y...:
can anyone help me???
is there any website or book anyone can recommend whereby they give step by step or detailed way on how bout doing it???
I am having troubles wif my code, the bolded part has an error and i have no idea y...:
Code:
Imports Microsoft.VisualBasic
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports System.Data.SqlClient
Imports System.Data.Common
Imports System.Data
Imports System.Transactions
Public Function ConfirmTransactions(ByVal tempCID As String)
Dim db As Database = DatabaseFactory.CreateDatabase()
Dim connection As IDbConnection
Using (connection = [B]db.GetConnection[/B]())
connection.Open()
IDbTransaction(Transaction = connection.BeginTransaction())
Try
db.ExecuteNonQuery(Transaction, "CreditAccount", srcAccount, amount)
db.ExecuteNonQuery(Transaction, "DebitAccount", dstAccount, amount)
Transaction.Commit()
Catch e As Exception
Transaction.Rollback()
End Try
connection.Close()
End Using
End Function
Last edited by a moderator: