Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need 2 distinct cursors using same view...HOW?
Message
 
To
27/12/1998 05:33:51
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00170395
Message ID:
00170741
Views:
23
Dragan,

> I've just opened a p-view in one work area, with one set of
> parameters, got two records. Changed the parameters, opened
> it under a different alias in another work area, got another
> set of three records, different from the first one. Went
> back to the first view, it still had the original two records.
> Great. Then I requeried, and, of course, got the same
> records as in the second one. Could it be you had the same
> scenario going on?

OK, I just did a command window test and am still getting the views crossed over...here are my exact commands:

set defa to d:\00files\foxpro\qt2 && correct directory
open datab db\sys && open database to get at views
vpstaffid = '1261' && this is the parameter in the view
use resourcerights_view in 0 shared && opens view
brow && looks right...lines are for staff person 1261
vpstaffid = '1202' && change parameter to different staff
use resourcerights_view again in 0 shared alias cCopy && open another instance
select cCopy && get to new work area that has been created
brow && RECORDS ARE STILL THOSE FOR STAFF 1261!!!!!!
requery() && this should use the same parameter as before (1202)...
brow && records now switch to 1202, BUT SO DID THE FIRST VIEW!!!!
select resourcerights_view && SAME AS cCOPY NOW!!!

So, a couple of weird things...the requery seemed to use the new parameter, but the second USE statement didn't. And when the REQUERY did take for the second view, it also changed the first view. I am totally clueless here. By the way, when you got this to work, did you open the second view instance into a whole new datasession using the NOREQUERY keywords? I have not been doing that, but am going to look into it...my form uses a private data session, so maybe I can open the second view instance in the default data session and use that as scratch space...

Thanks for your time...

JoeK
jkaufman@encompas.com
Previous
Reply
Map
View

Click here to load this message in the networking platform