Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Emulating a Private DataEnvironment
Message
De
28/03/2000 18:03:29
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00351719
Message ID:
00351736
Vues:
17
I thought the default for an instance of a Session was always a new, private datasession? (Have to go test this).

Thanks for the heads up.


>One flaw that I see is if you call this from an existing private datasession. The Session object only creates a new datasession if it is created in the default datasession. You may be able to get around this by changing datasessions in the Init of the class, I don't know.
>
>Then again, maybe this is a bug in the Session object that will be corrected in a future VFP version.
>
>
>>Hi All,
>>
>>This is related to my crusade to dissect the report metadata tables. Anyway, I am looking for a way to emulate a private dataenvironment defined in a report.
>>
>>I have the part down about extracting the table and relationships, but I'm thinking that a way to do this may be to script out a class definition for a Session object. In the scripted PRG, I can move custom datasession code like BeforeOpenTables, OpenTables, whatever to the Init of the Session and open all of the tables in the Session.
>>
>>I cannot interfere with whatever datasession may be open when the routine is called.
>>
>>Than I compile the script on the fly (thank you SP3!) and use NEWOBJECT("MySession","script.prg") to add a new session object (thank you, GT!).
>>
>>When I don't need it anymore, I release the Session object. I close all of the tables in the Destroy of the Session.
>>
>>Does this sound "do-able"?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform