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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top