HighTechTalks DotNet Forums  

CommandNotification And Caching Problems

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss CommandNotification And Caching Problems in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Giovanni
 
Posts: n/a

Default CommandNotification And Caching Problems - 05-24-2006 , 02:15 PM






Hi Folks,

Quick question: I have placed a GridView and SQLDataSource control in
a web user control. The SQLDataSource is bound to a parameterized stored
procedure. Consequently, the web user control is placed into a WebPartZone.
On the SQLDataSource, I have set the following properties: EnableCaching =
True, and set the SQLCacheDependency = CommandNotification. I have also
enabled the Service Broker on my SQL Server 2005 database. I also call the
SqlClient.SqlDependency.Start and SqlClient.SqlDependency.Stop Dependency in
the Global.asax file in the Application_Start and Application_End event. As
far as I know, my SQL Select commands (stored proc.'s) are compliant with all
the rules for creating a notification query.

Through SQL Profiler, I can see that caching works whenever I Add or
Delete a row from the table to which the SQLDataSource's stored procedure is
tied to. My page gets refreshed properly from the database instead of the
cache. If I were to UPDATE a row or field within a row (not add or delete),
my app does not get this new notification. I assume that this is because the
rowset count has not changed.

Am I doing something wrong? Is the caching meant to work with field
updates or only add/delete type updates as they change the rowset? Is there
anything I have to add? From what I have read thusfar, I need not include
any code to take advantage of the new caching features, only modify the 2
SQLDataSource properties.

Regards,

Giovanni P.

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.