Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution slow
Message
From
23/06/2000 18:05:19
 
 
To
23/06/2000 17:46:06
Bob Smith
Custom Data Services, Inc.
Mansfield, Massachusetts, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00383777
Message ID:
00384111
Views:
47
Bob --

Another approach is to use the LIKE operator in SELECT. You could put all the fields in the statement that you want the user to be able to select. The wildcard % selects all, so you can just assign that to parameters that the user has't chosen.

Date and numeric fields get a bit more complicated. I find that one additional logical field, e.g. lUseThisDate, works fine as follows:

WHERE
IIF (lUseThisDate, Table.dThisDate > ldThisDate, .T.) && if not using the date, includes the record.


I once built an ad-hoc query engine along the lines that you have. Working with parameterized views, I've found almost as much flexibility and probably greater speed.

Worth the tradeoff.
Previous
Reply
Map
View

Click here to load this message in the networking platform