New Posts New Posts RSS Feed: Cache Issue
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Cache Issue

 Post Reply Post Reply
Author
burrowsUW View Drop Down
Newbie
Newbie


Joined: 19-Mar-2009
Location: Washington Stat
Posts: 5
Post Options Post Options   Quote burrowsUW Quote  Post ReplyReply Direct Link To This Post Topic: Cache Issue
    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
Back to Top
burrowsUW View Drop Down
Newbie
Newbie


Joined: 19-Mar-2009
Location: Washington Stat
Posts: 5
Post Options Post Options   Quote burrowsUW Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down