Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple instances of VFP Server DLL shares all open tables?
Message
De
22/06/1998 10:36:14
Alastair Cameron
Farpoint Software Development Limited
Edinburgh, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Multiple instances of VFP Server DLL shares all open tables?
Divers
Thread ID:
00110548
Message ID:
00110548
Vues:
53
Hello.

I only recently realised that multiple instances of a VFP 5 ActiveX automation server that you build as a DLL (and for all I know,.EXE) share the same data environment (i.e. open tables, databases).

However, each instance has their own separate copies of global data (such as class properties) which I thought they would.

Specifically, say you have a VFP automation server compiled as a DLL, and it contains several methods, one of which is called OPENTABLES (which has several OPEN DATABASE / USE commands).

If from inside of VFP (or from other COM controller such as Active Server Pages) you do:

x = create("myvfpserver.class)
x.opentables

and then do:

y = create("myvfpserver.class)

method code running in the y instance of the server has access to .DBF
tables opened in the x instance, even if you have not called the
y.opentables method yet.

I didn't check if the record pointers in those tables were separate or shared, although presumably because private data sessions are NOT being used, if the record pointer is moved in one instance, the next time subsequent instances of the server access the table, the record pointer will be on the *SAME* record.

However, class properties are completely separate in each instance.

What implications does this have is you attempt in one instance of the server to CLOSE ALL / CLOSE TABLES - will this pull down the other instances of the server the next time access it attempted to a table that was previously open?

I appreciate that with Forms/Private Data Sessions you can get around this type of problem, buy my VFP server does not use forms/private data sessions!

Is this by design, and without using Forms is there anything you can do about this? It will not cause me a problem (I don't think) but I was still surprised that this was the case...I'd have figured that each instance was *COMPLETEY* self-contained.

Thanks.

Alastair Cameron
alastair.cameron@cableinet.co.uk
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform