Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views in the DE
Message
From
09/10/1997 11:54:18
 
 
To
09/10/1997 11:37:26
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00053848
Message ID:
00053906
Views:
35
>>I usually put that in the .BeforeOpenTables of the DE. I have views too complex for the view designer so the CREATE SQL VIEW command is embedded in class definitions. The classes are added in .BeforeOpenTables and there are methods that do the view creation and there is a method to add the view definition to the form's DE. I've also found that I don't need the base tables from which the views draw data from. But I've also found that these base tables are not closed when the form destroys. I may have to include them in the DE.
>
>How can you open the view if the tables for it are not opened?

I'm not sure if I understand your problem, but I use views in forms' DEs all the time without adding the underlying tables, or opening them in the default session. From my experience, views, like SQL, open the tables that they need. You can demonstrate this by highlighting a view in the project manager and clicking browse. It works without opening the tables.
My guess is that your original problem with table not found had something to do with the DE having the 'version'of your view, and the definition getting reset when you removed and re-added the view. I have had this problem before when changing the properties of a view, the form doesn't always immediately respect them.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform