Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble with views
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00441223
Message ID:
00441300
Views:
8
>The most flexible way to create a dynamic VIEW thats based on user defined criteria is to build up the underlying SQL into a string and recreate the VIEW on the fly. Using parameterized VIEWS only applies to the WHERE clause and is really not that useful.
>
>Since the SQL property of a VIEW is read only during runtime you'll need code that allows you to pass the SQL string as a parm to a procedure that recreates the VIEW based on the new SQL. You can get the complete VIEW definitions directly from GENDBC, a utility that ships with VFP.
>
>In order make this work you first must close the tables in the data evironment, drop the VIEW from the DBC, recreate the VIEW with the new SQL, then add the VIEW back to the DBC and reopen the tables.
>
>Charlie

Make sure to PACK the database periodically if you do this a lot, because it will seriously bloat with deleted records.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform