Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Environment vs. USE
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00407932
Message ID:
00408706
Views:
18
>>1. Speed - VFP opens tables and views faster if included in the Dataenvironment.
>
>Pardon, Larry, but I'm not sure I see why this would be a factor, particularly in a very busy form it would seem it might even be slower.
>

If your form is very busy and it opens a large number of tables and views (30+), then opening them using Use can be measurably slower (on PII 300 over 100Mbit Ethernet 4x slower).

>The main reason I find for not using the DE is cases where the tables are opened from completely variable paths based on selection criteria from another process - only USE works with that situation. E.g., I have 2,000 tables all with the same structure but different names, in various folders used by one form depending on path parameters like year, month, industry, etc. the user selects.
>

In cases like this, I would just add code to the BeforeOpenTables method to change the Database or CursorSource path for the affected Cursor objects but this is a personal preference. If it only affected 1 or 2 Cursor objects, I may leave them out of the Dataenvironment and manually perform a Use for this select group but I wouldn't abandon the DE altogether.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform