Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need advice on opening tables
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00975995
Message ID:
00976054
Views:
10
>I am looking into simplifying maintenance of my app. and perhaps reducing the size of the .exe file. The following is one aspect where I think I could improve things but I want to be sure that there are no side effects.
>
>In all my forms, in the LOAD method, I open only those tables that are used by the form. Most forms have Private Data Session. I am thinking about creating a procedure (in a .prg file) that would open ALL tables. Then in the LOAD method of all forms to call this procedure.
>
>Does the above seem like a reasonable approach or do you see any potential problems here?
>
>Thank you.

Dmitry;

Over the years there have been several different ways to open tables that have been popular for one reason or another. There is valid rationalization for each method. How many tables, and how much data are two things to consider.

1. Open in the Forms Load whatever table or tables needed.
a. If there is a lot of data there could be a noticeable hit on a Form’s “creation” time.

2. Open all tables when the exe is first instantiated.
a. You can have Splash screens and other bells and whistles lighting up the CRT while the tables open. This is less likely to causes a user problem with “load time”. All tables are ready for use. In your Form you simply reference whatever alias is required.

There are other variations on these two themes. Some people prefer to open only those tables essential to a Form while it is in use.

Tom
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform