Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution of SQL statement
Message
 
To
17/12/1998 17:19:52
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00168161
Message ID:
00168789
Views:
25
Good Suggestion Dragan,

I've changed my approach from:

m.lcPath = AddBS("C:\December 1998")
m.lcSQL = [SELECT * ] + [FROM ] + ForcePath( "entry.dbf", m.lcPath ) + [ INTO ARRAY aFees]

*-- Execute SQL statement
&lcSQL

TO:

m.lcPath = AddBS("C:\December 1998")
*-- I've added a WHERE clause ONLY for clarity
m.lcSQLWhere = [vendor="] + m.cVar + ["]

SELECT * ;
FROM ForcePath( "entry.dbf", m.lcPath ) ;
WHERE &lcSQLWhere. ;
INTO ARRAY aFees

This seems to do the trick without much re-engineering.

Thank you for your suggestion.

P.S. It has been proven that my initial approach WILL work with both Win95 & Win98 but NOT with Win NT 4.0. I do not know about NT 3.51.
Juan L. Romero
gcandela@javanet.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform