Friday, March 30, 2012

Problem with SQLCacheDependency

I am using a grid to display the data on my webpage, and I have 3 projects in my solution (UI, BLL, DAL). When I load the webpage I am creating the instance of a class written n my BLL project to populate the data, and in BLL I'm creating the object for the class in DAL and returning the datatable.

Now when I refresh the page using F5, the SQLDependency is working fine. But, when I use the Paging or Sorting option's on my grid I see in SQL Profiler that the query is posted back to the SQLServer to get the data.

If this is the senario then how can I make use of the cache object in .NET 2.0.

Please advice,
Ravi

I've posted a blog article that tries to explain some of the misteries behind Query Notifications here: http://blogs.msdn.com/remusrusanu/archive/2006/06/17/635608.aspx, maybe it can help you troubleshoot the issue.

I'm relly no expert in the SqlDependnecy functionality, but the explanation you give seems way too short to understand what the problem is.

HTH,
~ Remus

sql

No comments:

Post a Comment