none
SqlDependency sleep until onchange? RRS feed

  • Question

  • Is there a way to set SqlDependency, then sleep until the onchange event? 

     

    I have an ASP.NET page I want to call, set SqlDependency on a query, then sleep until the query result changes.

     

    I know I could set up polling from the server or client to acheive the same thing, but because of the time sensitive nature of this application, I want to wait for the data change, then timeout after say 20 seconds.

     

    I also know this will keep the client connection open to IIS during the process.

     

    If System.Threading.Thread.Sleep isn't a good choice, what about EventWaitHandle? (or will that only work between threads)

     

    Configuration:

    ASP.NET 2.0

    SQL2005

     

     

    Regards,

    jeffc

    Tuesday, August 28, 2007 8:02 AM