New Posts New Posts RSS Feed: Disconnecting the App
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Disconnecting the App

 Post Reply Post Reply
Author
*Calsy View Drop Down
Groupie
Groupie


Joined: 02-Feb-2009
Location: Australia
Posts: 69
Post Options Post Options   Quote *Calsy Quote  Post ReplyReply Direct Link To This Post Topic: Disconnecting the App
    Posted: 30-Mar-2009 at 3:27pm
Hi All, Im currently prototyping up disconnected functionality for our application. I cache all data needed locally than disconnect the PM. The problem is than I get a lot of errors stating "DataSource fetch strategies are not allowed when disconnected". The problem is that we set the querystrategy in our queries throughout the system. Is there anyway that when the PM is disconnected that it disreguards the querystrategy setting? Or do I have to write case statements around all our getentity calls?
 
Thanks
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 31-Mar-2009 at 12:01pm
Matthew, I assume you're still working with DevForce Classic, although the issue exists in DevForce Silverlight too.  We currently assume if you've set the fetch strategy to DataSourceOnly or DataSourceThenCache that this was intentional, and document that the InvalidOperationException will be thrown if the PM is disconnected.
 
Setting the PM.DefaultQueryStrategy to a cache-only option is usually a good idea when going disconnected.  If you need to set the strategy on either the queries or with the Get* calls, then, yes, you will need to provide your own scheme for switching the strategy based on connection state.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down