I thought that my program had closed - it hadn't !!
Posted on 2003-03-14
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.