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!

Creating Views with macro substitution in different VFP versions

Status
Not open for further replies.

Olaf Doschke

Programmer
Oct 13, 2004
14,847
DE
I inherited maintainance of a VFP7 application and today am very thankful for Tamar writing about view creation with macro substitution in "What's New In Nine":

[link ]View creation with macro substi[/url]

I am still not finished, but I could now regenerate a view database with code by GenDBC, modified in the places macro substitution is used within the view SQL. By the way: It's no fault of GenDBC the skript it outputs has it wrong, GenDBC retreieves the SQL as stored in the DBC, and as that was a VFP7 DBC it has SQL stored with &lcWhere (for example) instead of &?lcWhere.

Now regenerating the view database I had to change &l to &?l in several places, and could generrate a new view DBC (with some new modifications) with VFP9.


Thanks, Tamar, that saved my day.


Now I only need to find out if those views work with VFP9 with SQLENGINE 70, which is needed for legacy mode GROUP BYs in some places. I think I'll do a little test with a new simple view, to see it works.

Bye, Olaf.
 
It works!

I can use such views in VFP9 with EngineBehavior 70 and 90. I also can use the views in VFP7, too.

I think I only would have problems in VFP8, anyway, as the macro substitution syntax you needed to use at view definition only differed there. Indeed the SQL query determined by dbgetprop was not using ?lcWhere, but simply &lcWhere, so maybe VFP7 allowed both ways.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top