Asynchronous Queries

  • Thread starter Thread starter Ryan
  • Start date Start date
R

Ryan

Hello,

I'm trying to build a multi-user scheduling application using SQL Server
2005. I'm trying to first populate the schedule when it first loads with all
appointments. Next, I was wondering, is there any way to do an Asynchronous
query or something that would stay open that would allow me to detect when
something was added, updated, or deleted? This would allow me to not have to
have the schedule go out and constantly refresh itself every x seconds and
then dump all appointments, then reload them.

Thanks.
 
Hello,

  I'm trying to build a multi-user scheduling application using SQL Server
2005.  I'm trying to first populate the schedule when it first loads with all
appointments.  Next, I was wondering, is there any way to do an Asynchronous
query or something that would stay open that would allow me to detect when
something was added, updated, or deleted?  This would allow me to not have to
have the schedule go out and constantly refresh itself every x seconds and
then dump all appointments, then reload them.  

  Thanks.

You need this: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldependency.aspx
and the sample of using sqldependency you can find on
http://www.codeproject.com/KB/database/chatter.aspx
 
Back
Top