September 12, 2006 at 8:17 am
I am developping a multi user application with SQL Server 2000 in c#
I tried to us RAISERROR with triggers in order to know if the database have been change and refresh the screen for each user.
Apparently, this functions only if the RAISERROR has been called from the same connexion (user).
If you have any trip to avoid this problem I will be very interested.
Thanks,
Romaric
September 12, 2006 at 8:22 am
You'd need to put a falg in a separate table, then have the application poll that table every X minutes to see if it needs to refresh. Then act accordingly.
September 13, 2006 at 2:24 am
Or if there is only one connection modifying the table; you could create an application lock, uphold it until you have done your updates and have your notifications that way.
I.e let all user program (instances) wait (in different thread of course) on this application resource and 'refresh' their data everytime the lock 'goes down'.
I believe it could be a little more effective then refreshing a 'flag' table to see when the data was refreshed but I have done no research into it.
September 13, 2006 at 2:57 am
I usually use some kind of 'CacheManager' within my code. In case a user/client makes a change in the database, you can either update your CacheManager at once or flag the cache that it needs to be refreshed the next time it's been called. Works for my apps, but I don't know exactly what your goal is.
September 13, 2006 at 6:48 am
Thanks for your answers.
I will use a time stamp table to check if some tables have been modified.
And to modify this table I will use triggers.
Romaric
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply