>Here's what I'm finding...
>
>Any object in FoxPro that runs a query, whether against native DBFs or Sql Server, will create the cursor in the DataSession which was active at the time the object was created.
>
>The means that if you have a BO created in Form A with a Private DataSession, and you pass that object to Form B which has its own Private DataSession, if you use the object to run a query from Form B, the cursor will be created in the DataSession from Form A.
>
>Crazy! But true. It took be about an hour of stepping through the codez to figure this out.
>
>
Does anyone know a work around, or a pattern to avoid this??>
>
>.
We'll I've solved this. At least to my liking...
If anyone is interested, since I built my data access framework on top of West-Wind wwBusiness, I've posted my solution in that forum, as I discussed some of this with Rick Strahl along the way:
http://www.west-wind.com/wwThreads/default_frames.asp?Thread=4320VIHZP&MsgId=4370FPW56.