Home All Groups Group Topic Archive Search About

SqlDependency - Options and Timeout

Author
16 Apr 2006 5:43 PM
Gidion
Hi,

I'm using SqlDependency quite a lot and really love it, but there are
two things I just can't seem to find anywhere on MSDN or elsewhere.

1. One of the SqlDependency constructors, allows you to pass a "string
options", which sounds great. But IntelliSense on this item is useless
and just points to SqlNotificationInfo.Options which says nothing.
I would be interested in knowing what to pass into that string and
which format it has to have.

2. The reason I'm trying to find that out, is the time-out. I've read
here
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/querynotification.asp)
that I am informed if my dependency time-out. (Either using the server
default or the value I passed to the constructor.) But it's not
happening. I tested using the server default and a value of 10s. I just
waited to see what happened and never got a notification. If I then
changed the data (with the app still running) the app didn't get
notified, because the dependency had already timed-out. Is this a bug
or am doing something wrong?

I really would appreciate any answers or suggestions!
Thanks,
Alex

Author
22 Apr 2006 11:49 PM
Mary Chipman [MSFT]
The options enumerations are described here:
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlnotificationinfo.aspx

If this doesn't help, let me know. Things have changed significantly
since the article you refer to was written.

--Mary

Show quote
On 16 Apr 2006 10:43:24 -0700, "Gidion" <alexander.duggl***@gmail.com>
wrote:

>Hi,
>
>I'm using SqlDependency quite a lot and really love it, but there are
>two things I just can't seem to find anywhere on MSDN or elsewhere.
>
>1. One of the SqlDependency constructors, allows you to pass a "string
>options", which sounds great. But IntelliSense on this item is useless
>and just points to SqlNotificationInfo.Options which says nothing.
>I would be interested in knowing what to pass into that string and
>which format it has to have.
>
>2. The reason I'm trying to find that out, is the time-out. I've read
>here
>(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/querynotification.asp)
>that I am informed if my dependency time-out. (Either using the server
>default or the value I passed to the constructor.) But it's not
>happening. I tested using the server default and a value of 10s. I just
>waited to see what happened and never got a notification. If I then
>changed the data (with the app still running) the app didn't get
>notified, because the dependency had already timed-out. Is this a bug
>or am doing something wrong?
>
>I really would appreciate any answers or suggestions!
>Thanks,
>Alex

AddThis Social Bookmark Button