|
|
|
start date: Wed, 8 Aug 2007 13:14:06 -0700,
posted on: microsoft.public.dotnet.framework.adonet
back
| Thread Index |
|
1
Lubomir
|
|
2
Petar Atanasov
|
SQLDependency timeout
Hi,
How to set up dependency so that it will never expire?
If time-out = 0, it indicates that the server's time-out should be used.
What is it? How can I set up server's time out?
All I want it is, that SQLDependency will not expire while my application is
running.
Thanks,
Lubomir
Date:Wed, 8 Aug 2007 13:14:06 -0700
Author:
|
Re: SQLDependency timeout
Lubomir wrote:
> Hi,
>
> How to set up dependency so that it will never expire?
>
> If time-out = 0, it indicates that the server's time-out should be used.
> What is it? How can I set up server's time out?
>
> All I want it is, that SQLDependency will not expire while my application is
> running.
>
> Thanks,
>
> Lubomir
Hi Lubomir,
There are two ways to define SQLDependency:
1) OutputCache
http://msdn2.microsoft.com/en-us/library/hdxfb6cy.aspx
Sample code:
<%@ OutputCache Duration="10″ VaryByParam="*"
SqlDependency="[sqldependencyname]:[tablename]" %>
2) DataSourceControl
http://msdn2.microsoft.com/en-us/library/system.web.ui.datasourcecontrol.aspx
Sample code:
<asp:SqlDataSource EnableCaching="true" CacheDuration="Infinite"
SqlCacheDependency="[sqldependencyname]:[tablename]" … />
Choose the one that fits your needs best and in addition follow the
discussion here (could be interesting for you):
http://forums.asp.net/t/1122982.aspx
HTH,
Petar Atanasov
http://a-wake.net
Date:Tue, 14 Aug 2007 16:43:24 +0300
Author:
|
|
|