Last post Nov 18, 2008 08:49 AM by itay.basoni
Nov 17, 2008 10:03 AM|itay.basoni|LINK
When I'm creating ... let's say, a new product (it can be anything like users, orders .. etc) ,
I can see it added successfully to the table in the page but somehow it's missing in the filters (above the table) select boxes.
I'm assuming this problem happens due to a caching machanism built into the Dynamic-Data controls - please correct me if i'm wrong on this one !!??
The quick workaround for this problem will be to disable the caching for the whole project but I can't seem to get it disabled =/
Any help is appreciated ..
Thanks in advance.
Nov 17, 2008 02:54 PM|itay.basoni|LINK
Simply put, How can i stop LinqDataSource from caching the results from SQL-Server?
Nov 17, 2008 03:46 PM|ricka6|LINK
Can you reproduce this problem with the Northwind or Adventureworks DB. Explain exactly what you are doing and the behavior you expect.
Nov 17, 2008 04:36 PM|itay.basoni|LINK
I can try to explain it better and hopefully help you help me.
In a Dynamic-Data project there's a dynamic page called ListDetailsTemplate (located under: App_shared/DynamicDataPages/ListDetailsTemplate.aspx).
That page is consisted with two main objects: 1 .asp:DynamicFilterRepeater (filtering the GridView), 2.asp:DynamicGridView (showing the data)
so far so good.
When i'm adding or deleting a product i can see it has been successfully added or deleted from the GridView control but the DropDownList in the DynamicFilterRepeater doesn't show any change at all !
The change appears after i do a "iisreset" from the command line - which simply tells me that it's a caching/session/whatever problem =/ and i can't seem to find a workaround for it.
Also, another symptom i've come to notice is:
When i do "iisreset" and refresh the page i can see 5 queries are being executed in the SQL-Server (through the SQL-Profiler tool)
and in the next refresh there are only
3 queries executing which also point out to a caching issue.
I don't mind the performance - i just want the data fully synchronized.
Hope it explains it a bit better.
Nov 17, 2008 05:59 PM|ricka6|LINK
You should never need to reset the IIS server to see new data. IIS is not caching the data unless you've set up the OutputCache (off by default). Can you disable the OutputCache to verify this? The DynamicFilterRepeater (FR) only displays
FK's and booleans. See if you can duplicate your problem with the AdventureWorksLT DB. Because the
FR only displays FK's and booleans, once you deleted or inserted a row you would not see any change to the
FR unless the entity had a FK into itself (such as the ProductCategory table in the AdventureWorksLT DB.
Nov 17, 2008 07:43 PM|ricka6|LINK
I just tested this on Windows 2008 with the AdventureWorksLT DB. I inserted a new address entity with address
123 easy street in the address entity(table), I then navigated to the
CustomerAddress page - the FR did show the new address.
Nov 17, 2008 08:56 PM|davidebb|LINK
I think you may be using a very old build of DynamicData (and we did indeed have this caching bug way way back). The only supported release right now is the one that comes with Framework 3.5 SP1. Where did you install from?
Nov 18, 2008 06:28 AM|itay.basoni|LINK
First of all, thank you guys for the replies !
I've installed .Net Framework 3.5 sp1 and reproduce the problem with AdventureWorks.
The case i'm having troubles with is a "Same table relation", just like the Employees table in AdventureWorks.
Unfortunately the problem remains, both for my DB and AdventureWorks.
The project's references are as follows:
System.Data.Linq, System.Data.DataSetExtensions, System.Web.Extensions - All are in the same 126.96.36.199 version with a runtime version v2.0.50727
Anything else I can check ?
Nov 18, 2008 08:49 AM|itay.basoni|LINK
After watching the new getting started videos on dynamic-data
here I've noticed it's a totally different project structure than what I have;
so I just installed "Visual Studio 2008 sp1" which solved the problem by creating the Dynamic-Data project with the correct release version.
Thanks again for all your help !!