Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use again from private datasession to default
Message
From
08/01/2002 04:00:02
Vladimir Zhuravlev
Institute of the Physics of Earth,Russia
Moscow Region, Russia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Use again from private datasession to default
Miscellaneous
Thread ID:
00601842
Message ID:
00601842
Views:
76
I usually use the following constraction
select * from table into tmp
use dbf('tmp') again in 0 alias newalias and it always worked
Today I face with new situstion
Here it is
I have first form with default datasession
somewhere in code I do select and put it into dataenvironment
like this
select * from table into tmp
thisform.dataenvironment.addobject('tmp','cursor')
thisform.dataenvironment.tmp.alias='tmp'
thisform.dataenvironment.cursorsource=dbf('tmp')
I tested after it I can do
select * from (thisform.dataenvironment.tmp.alias) into cursor _tmp
work OK
and
use (thisform.dataenvironment.tmp.cursorsource) again alias _tm
It work OK
Now I did second form with private datasession, which I call from first one
like do form second with thisform
In init of the second form I wrote
lparameters _ob
thisform.ob=_ob
Now I tryed to repeat use comand for cursor from first form like that
use (thisform.ob.dataenvironment.tmp.cursorsource) again alias _tmr
and recieved the message about error number 3-file is in use
I did it to get data from the first form in my second form
You can say, put this table directly in the second form dataenvironment
Sure, it will work. But I have very serious reason don't do it
I did it all for client-server and I try to avoid many similar queries
to the server.
In my project second form can be called many times from first one at diffrent records, thats why it
second form must be in private datasession
I whanted to make all queris all reference data in first form and
get them already on client side in the second forms
So, whay use with again here fails?!!!
Sorry for very long exlanation
I have some other mechanism of sending/getting cursor data between forms with diffrent datasession. but it requies lots of coding, sending afields data from first form to second, making cursor there and making sicle to insert
all records from from from first form to second with private datasession constantly switchind datasessionid, so I started to hate it and wahnted to develope something new
Thanks in advance
Vladimir Zhuravelv
Thanks in advance
MVP-2006-2011, PHD in Math and Physics ,
host of www.foxclub.ru,
VFP lector at Interface and Microinform companies
Head science researcher of VNIIA Rosatom.
Next
Reply
Map
View

Click here to load this message in the networking platform