Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening/Closing dbf's within a VFP component
Message
 
To
09/02/2000 07:57:36
Scott Knight
Human Resources Development Canada
St. John's, Newfoundland, Canada
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00329333
Message ID:
00329419
Views:
16
Why not run a method from the calling program that opens the tables and leaves them open.

Then call the processing method X number of times in the calling program.

Then run a method from the calling program that closes the tables.

How are the variables created? If they are just assigned a value, they are private by default. This means they are in scope until the method is completed (ie. they are in scope for that method and lower level (called) method).

I would experiment with very simple examples and see what works best in your situation.

Joe




>I'm trying to find out what is the correct way to handle opening and closing of dbf's within com object with respect to time and scalability. If I create a component which has a method which receives several parameters, opens several tables does something and returns a value. What is the proper way to handle to opening and closing of the tables (i.e cleanup). The first time the method is run the tables are not open so I have to open them, I run the method should I close the tables explicitly or do they close automatically when the object is destroyed. Also throughout the day I may hit this object and method many times. If I don't open/close each time would that be a significant number of opens and considered inefficient. As you can probably tell I am little confused about the whole notion. Along the same lines, what about variables that are created in the method. Should I explicitly release any that I can before the end of the method or does it matter.
>
>Any info would be great...
>
>Thanks
>
>
>
>Scott
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Previous
Reply
Map
View

Click here to load this message in the networking platform