sqlconn.Open() Try myTrans = sqlconn.BeginTransaction() s1.Connection = sqlconn s1.Transaction = myTrans s1.CommandText ="insert statement" s1.ExecuteNonQuery()
s1.CommandText ="some update statement" s1.ExecuteNonQuery() myTrans.Commit() Catch ex As Exception myTrans.Rollback() mb.ShowMessagebox(Page, ex.Message) Finally sqlconn.Close() end try
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)