Hi Anders! Thank you! You are probably right. VFP8 handles ; lcComp =3D 'AF' s =3D " company =3D lcComp" Create sql view vwMyView as ; SELECT * FROM tblComp1 ; where &s
In the real view (too complex to show here - all would fall asleep) I have temporary removed the group by commands but the problem still remains. I will try SYS(3099,70|80).
Roland
-----Ursprungligt meddelande----- Fr=E5n: profox (at) leafe .D.O.T com [mailto:profox@leafe.com] F=F6r Anders Altberg Skickat: den 26 december 2002 12:24 Till: Multiple recipients of ProFox =C4mne: Re: SQL - VFP8 and macrosubstitution in a viewdefinition
Have you tested it from the command window with simple one column, one tsble, on searchcondition in the where-clause for starters? I tried c=3D"company" t=3D'Companies' s=3D"WHERE "+c+" =3D'E'" SELECT &c FROM &t &s and it worked alright. Try ? [ SELECT &cFieldList ; FROM &cTableList ; WHERE &cWhere] It will show the expanded macros. VFP8 has stricter GROUP BY and HAVING rules. That wouldn't affect your query I suppose. There's a SYS(3099,70|80) to switch data engine compatability between VFP7 and VFP8 modes. I'm not sure if it works in early betas. -Anders
----- Original Message ----- From: "Roland Nyberg" <Nyberg.Roland (at) telia .D.O.T com> To: "Multiple recipients of ProFox" <profox@leafe.com> Sent: Thursday, December 26, 2002 12:13 AM Subject: SQL - VFP8 and macrosubstitution in a viewdefinition
> I tried VFP8 on an app I have been working on some time now. Problems > with macrosubstitutions in queries. > > In hackers Guide we can reead; > > Another common place for a macro is in queries. You might build up any > of the field list, the table list or the WHERE clause in a string and > then macro-expand it like this: > > SELECT &cFieldList ; > FROM &cTableList ; > WHERE &cWhere > > This kind of very flexible queries works fine in VFP7 but how can i have > it to work in VFP8? > After changing the content in cWhere VFP8 says "View definition has been > changed" and stops. > > Any ideas? > > Roland > > > ---------------------------------------- > Subscription maintenance at: > http://leafe.com/mailListMaint.html > > >
---------------------------------------- Subscription maintenance at: http://leafe.com/mailListMaint.html
=20
©2002 Roland Nyberg |