try { SqlConnection con = new SqlConnection(@"Data Source=ttt100;Initial Catalog=TEV20;Integrated Security=True"); SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.Connection = con; SqlTransaction trn = con.BeginTransaction(); } // there is some code after this...