Phylum Posted June 20, 2003 Posted June 20, 2003 I am using VB .NET to create a program that allows the user to log in with a username and password. When they log in a entry is made in a database, and when they log out that entry is deleted. This works all fine and well except for 1 thing. If the user crashes while inside the program then the data entry obviously is not deleted and therefore the program still thinks they are logged in. Is there any way to detect the crash, or find out somehow that the user has crashed and therefore is no longer logged in? Thanks in advance Phylum Quote
*Experts* Bucky Posted June 20, 2003 *Experts* Posted June 20, 2003 You could do a number of things to solve this problem. The most direct, although most difficult, is to write flawless code so that the program is guaranteed not to crash, but this is impossible. A more reasonable option is to have a program running in the background that periodically "pings" your program via the SendMessage API or Sockets. If it doesn't receive a reply, then the program died, and have this background program delete the record. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.