MCQs > Database Management > ADO.NET > You have defined a command named 'cmdA' and an open connection named 'con'. You created a new transaction: Dim trans As SqlClient.SqlTransaction = Nothing How will you assign the command to the transaction and begin the transaction?

ADO.NET MCQs

You have defined a command named "cmdA" and an open connection named "con". You created a new transaction:
Dim trans As SqlClient.SqlTransaction = Nothing
How will you assign the command to the transaction and begin the transaction?

Answer

Correct Answer: trans = con.BeginTransaction()
cmdA.Transaction = trans
cmdA.ExecuteNonQuery()

Explanation:

Note: This Question is unanswered, help us to find answer for this one

ADO.NET Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

ADO.NET Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it