Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2003-03-14
3
Medium Priority
?
184 Views
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.
Steve
0
Comment
Question by:StevenK
3 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 8138228
Hello

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

Author Comment

by:StevenK
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.
Steve
0
 

Accepted Solution

by:
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
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

572 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