I thought that my program had closed - it hadn't !!

Posted on 2003-03-14
Medium Priority
Last Modified: 2010-04-15
This may be something simple that I'm just missing the point on.
I have a C#/.Net application that works against a number of databases and makes entries / updates to a SQL Server database.
I emptied my target database and started my application (run-time rather than through the design editor).  Shortly thereafter I remembered that I still had a mistake in the code, so promptly chose to close my application (from the task bar - I have Windows 2000).
I had assumed that my application had then ended - it was not visible in the 'Application' tab within 'Windows Task Manager' and not was visibly running on the desktop.  
I set about the emptying of the database table again - successfully.
I then did a COUNT against the tables to ensure that they were empty (I'm a stickler for being careful) and found that there were now entries in the tables.
It appeared that my application was still running - and entries being made / updated to my SQL Server database tables.
The application was then found to be running through the 'Processes' tab within 'Windows Task Manager'.

My question (at long last I get to the point ...) is how do I ensure that when I close the application (through whatever means) all the processes associated with it are stopped and my application is actually killed.

This may be a simple issue with an obvious answer (I'm hoping so) but I can't see it for looking.

Thanks in advance.
Question by:StevenK
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 8138228

  from Process Tab Click on your process and choose End Process Tree, that should end your application with it's associated process

Author Comment

ID: 8142168
Hi - I know how to kill the application.
My concern is that when I deploy my application(s) at a client site that they think that they have stopped the application (through whatever means) but it's actually still running (and seen through Task Manager) unbeknownst to them.

Accepted Solution

jtellis earned 60 total points
ID: 9049272
there is an easy way to fix this...In your nested loops that update the databases simply add in an if statement that gives the user the option to stop the process and delete the entries that were previously made.  if you send some code example i'll show you what i mean

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question