Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create one Data Environment for App?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00170566
Message ID:
00170568
Views:
15
>I have 5 forms, all using the Default Data Environment, and each with AutoOpenTables=.t.. Each form opens slowly, so I thought I would open all the tables at application launch time. Is there a quick and easy way to get all that Data Env information into one "Application Data Environment"? Or am I going to have to look at each form's environment and code it all out into my main.prg file?

The idea to open all tables at the beginning of an app is good because VFP opens tables again faster if already open in another area or DS. The down side to having your forms all using the Default DS is you start to develop conflicts and contention problems. In private DS, you do not have to alias each table or view with respect to the same tables/views open in other private DS. Each form can work independently in a private DS.

I guess all this can be made to work if all forms use the default DS, but you create much more work on yourself keeping up with relations, aliases, orders, etc. I assume sometimes you need orders and relations to be different in some forms versus what they may be in other forms. If they are, you can hose your app if you do not reset. What if you have an order and relation set in one form, but the order and relation for the same tables may be different in another form? If both forms can be open at the same time, you have a problem. IMHO, Private DS is the way to go in most cases and recommended if at all possible.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform