Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you create a private data session in a program?
Message
De
29/08/2001 12:54:18
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00550412
Message ID:
00550429
Vues:
28
>I need to create a private data session in code. We have a program module that opens all the tables and then does a lot of up front work and before running a form. I just found out that you can only open a new data session from within a form. At least that is all I can find. Is this right?

John,
If VFP6 SP3 or later you could use Session object.
If prior :
-If would be followed by a particular form you could still do it in form.load.
-You could define a form class with private datasession and :
* Poor man's session :)
oForm =createobject('PrivateSession')
lnSessId = set('datasession')
set datasession to oForm.DatasessionID
*do your work
set datasession to lnSessId
oForm.release

define class PrivateSession as Form
 Datasession = 2
enddefine
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