Print Page | Close Window

Cache Issue

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1367
Printed Date: 25-Mar-2025 at 7:23am


Topic: Cache Issue
Posted By: burrowsUW
Subject: Cache Issue
Date Posted: 08-Jul-2009 at 12:04pm
Hi,
 
I have the following code:
 
    Private Sub LoadData()
       
        Dim prodQuery = theManager.Products
 
        If theStatus Is Nothing Then
            theStatus = New StatusInfo
            theStatus.IsCached = True
            prodQuery.QueryStrategy = QueryStrategy.DataSourceOnly
        Else
            prodQuery.QueryStrategy = QueryStrategy.CacheOnly
        End If
 
        theManager.ExecuteQueryAsync(prodQuery, AddressOf OnProductLoaded, Nothing)

    End Sub
    Private Sub OnProductLoaded(ByVal args As EntityFetchedEventArgs)

        productGrid.ItemsSource = args.Result

    End Sub
 
The object reference "theStatus" is working correctly and getting me to the correct QueryStatus code in the If block, but regardless, the application goes to the Server (DataSource) regardless of the QueryStrategy setting.
 
I assume I am missing something fundamental and could use some help.
 
Thanks ... bill



Replies:
Posted By: burrowsUW
Date Posted: 09-Jul-2009 at 12:47pm
Please disregard my question -- I figured it out and it was one of those dumb things and my error.
 
bill



Print Page | Close Window