Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use again from private datasession to default
Message
De
08/01/2002 05:15:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
08/01/2002 04:00:02
Vladimir Zhuravlev
Institute of the Physics of Earth,Russia
Moscow Region, Russie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00601842
Message ID:
00601851
Vues:
17
>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

Vladimir,
Instead you could create a temp dbc and view and share it between sessions.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform