Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP8sp1: Rebuild View after base table changes

Status
Not open for further replies.

Kurtwood

Programmer
Sep 7, 2002
39
BS
Hi all,

Is there a way to automatically rebuild a view if I add or change a field in the base table? I have all fields (*) selected in the view. I use the view designer to maintain my views.

In theory, the program would have to scan my list of views and filter those using my changed base table then apply settings to the “Update Criteria” properties, etc.

Is this something worth putting in my VFP wish-list or does someone have a solution.

Thank you kindly


Kurtwood L Greene
The Bahamas
 
Hi!
I do suggest two options:

-1
After you created the view in the view-designer simply copy the view-definition into code (prg). Than, after you altered fields of the base-tables modify and run that code to recreate the view.
-2
Use third party tool like Stonefield Database Tools (SDF).
Using that tool, changes in the base-tables will result in automatic updated views.

Hope this helps.

-Bart
 
Thank you Bart. I did not want to do the first suggestion however I will checkout Stonefield and weigh my options.

Kindest Regards
Kurtwood
 
I strongly recomend you to switch from views to CursorAdapters. They are more flexible then views and if you want to switch the DataBase from NATIVE to something else you can do it much easier with CAs then with views.

Borislav Borissov
 
Thank you Borislav,

I will investigate CA as soon as i receive my VFP9.0 copy. I know it exist in ver. 8 but i perfer to work with the lastest modifications.

cheers,
Kurtwood
 
You may start investigating them right now as they are in 8.0 as well!

Volker/
 

Borislav,

I agree that CAs are more capable than remote views and often provide a better way of accessing remote data. But I disagree with your advice that Kurtwood should switch from RVs to CAs just to solve the problem of having to rebuild a view after the base table has changed.

I don't know anything about Kurtwood's aplication, but if it is a large app with many references to views scattered all over the code, switching to CAs would be a pretty drastic step to solve a relatively small problem.

Of course, if he is only just starting out on developing the app, that's another matter.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

I agree. My app is somewhat large with many references to views scattered all over the code.

I will most likely implement CAs in my next app.

Thank you all.
Kurtwood
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top