Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing the view before the tables
Message
 
 
To
14/10/1997 22:45:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00054613
Message ID:
00054647
Views:
30
>In one of my form, where I have a view, I had to do a small change regarding the ThisForm.DataEnvironment.CloseTables().
>
>In that form, I was not using any buffering. So, the changes were done directly on the related tables for the view. However, sometimes, this was causing me some problem when I was letting the form to close the tables by having ThisForm.DataEnvironment.AutoCloseTables=.T. I had to put it to .F., and close the view manually first and then close the tables in order to avoid the problem.
>
>With AutoCloseTables=.T., I was, sometimes, having a message saying that the table (one of my table used for the view) was not found or something similar to that.
>
>Is that because I was using no buffering or when using views we should always close the view first?

Michel,

If VFP creates the view as just a filter on the tables in the query, then it seems reasonable to have to close the view before the source tables. But if the view is created (in VFP 5, not sure about VFP 3) with the NOFILTER clause in the select statement, then the view is a temporary table that should not be dependent on the source tables being open. But, since NOFILTER would create such a temporary table written to disk, you take a performance hit. I am not sure buffering had anything to do with it.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform