SQlTransaction and SQlDatareader!
-
Hi All, There is problem with SQlTransaction I have datatable filled from txt file . Now before insert I check if the Row Exists so I use sqlDataReder. But I want to add the SQlTransaction , I am getting problem Thanks, Navneet
Develop2Program & Program2Develop
-
Hi All, There is problem with SQlTransaction I have datatable filled from txt file . Now before insert I check if the Row Exists so I use sqlDataReder. But I want to add the SQlTransaction , I am getting problem Thanks, Navneet
Develop2Program & Program2Develop
SqlConnection dataConnection = new SqlConnection();
SqlCommand dataCommand = new SqlCommand();
dataConnection.Open();
dataCommand.Connection = dataConnection;
dataCommand.Transaction = dataConnection.BeginTransaction();//use dataCommand.Transaction.Commit()
//use dataCommand.Transaction.Rollback()hope it will help
Becoming Programmer...