I am a college student developing a local chat application using VB.Net and SQL 2005. I have multiple clients connected to a server via local ip. My first problem is, how will I know which users are online. Each user has their own username and password in order for them to log-in to the application. I've tried putting code con.execute("update tbl_user set status='ONLINE'") on the log in button and use con.execute("update tbl_user set status='OFFLINE'") on the logout button. However, when the program terminates unexpectedly, it does not update the status in SQL. Is there a better way to do this?
My second problem is the file transfer. I would like the users that are connected locally be able to send files to each other. It's like attaching a file in my chat application and send it to another user. How can I do that using VB.net and SQL?