Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's really happening with MTDLL data sessions???
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
What's really happening with MTDLL data sessions???
Miscellaneous
Thread ID:
00688419
Message ID:
00688419
Views:
60
Can somebody please explain this behavior to me:
- I have defined an OLEPUBLIC VFP class derived from CUSTOM, which I've compiled into an MTDLL
- I create a COM object from that class within ASP
- Within a method of the object, a DBF is opened (this would be in the default datasession since the class is derived from CUSTOM rather than SESSION, no?)
- The object is destroyed when the ASP page finishes

This all works fine. But what I don't understand is this: When another object is created from the same class (let's say I load the ASP page again), I would expect the table to still be USED, but it's not. All tables that were opened during the life of the object are apparently closed when the object is destroyed.

This is _not_ what I expected. I thought that the default datasession was scoped to the the DLL, rather than only being scoped to the life of the object. I thought that once a table was USED, it stayed open until it was explicitly closed by code or by unloading the MTDLL (restarting IIS, in this case).

Could somebody please explain what's really going on? I need more understanding of which data structures are "global" and persistent within an MTDLL vs which data structures are scoped to an object created from a (class within a) MTDLL as the object goes through its life cycle.

Thank you!!
Next
Reply
Map
View

Click here to load this message in the networking platform