0

Hi
Im working with a project, simple IM for our office... I have a Table in sql with column Status, if a user opens this application, the status column changes from 0 to 1, if it closes this app, the status turn back to 0. On my form load event, it pulls data from the database where status = 1 (shows logged on users). Here is the situation, if a user opens the app, he will see every logged on users, when someone closes it, he shouled be removed from the lists of logged on users. what i did is to call the form load event again to refresh m lists, but i need somthing to trigger this call. Im thinking of the CDC feature of sql but how will i tell vb.net that there are changes happen to database?

Hope I explained it clear

Thanks in advance

2
Contributors
4
Replies
14
Views
4 Years
Discussion Span
Last Post by Lethugs
0

Just CDC won't help you here. It runs on the server only. The only way to notify your app from SQL Server would be to create an UDF that does that, which is not simple. A polling mechanism is much easier.

0

Thanks for the idea

Im creating a IM for our office, Is there a better way to monitor if my application is open from any computer within the network? I just need to add online users from my list/ then remove them if they are offline (offline if the application is close)

thanks again

0

IM is usually done over sockets (UDP/TCP). Clients connect to a server application that knows who's online and does database interaction.

Here's an example.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.