this is my code
database connnection am using web.config file
here i want use transaction begins and commit and rollback options
anyone know abt this code
pls quide me
Thanks
Code:
string txt1 = TextBox1.Text;
DateTime txt2 = Convert.ToDateTime(TextBox2.Text);
DataSet1TableAdapters.userdetailsTableAdapter useradapter = new DataSet1TableAdapters.userdetailsTableAdapter();
System.Data.SqlClient.SqlTransaction tr;
try
{
useradapter.InsertQuery(txt1, txt2);
tr.Commit();
}
catch
{
tr.Rollback();
}
here i want use transaction begins and commit and rollback options
anyone know abt this code
pls quide me
Thanks
Comment