Mark, Roxanne,
>>It won't for view definitions where a ?&cWhere clause is used.
>In my experience this only works one time -- at the time you create the view in the DBC. Whatever
cWhere was equal to when the view was added to the DBC is now in the view definition in the DBC. It is not something that gets evaluated everytime the view is opened or requeried. Or did I miss where you are using this?
Nope, this works fine. You can define a view (with eView or programaticly) with a ?&cWhere clause.
for example:
CREATE SQL VIEW "VW_ZIEKMELDING" ;
AS SELECT *, ;
FROM verlof!ziekmelding ;
WHERE &?cWhere ;
ORDER BY zie_meldtimestamp DESC
If loading the view in the DE you'll have to make sure that either cWhere exists or NoDataOnLoad is set to .t. Whenever you do your REQUERY cWhere should exists. This is the only method I know of to make a flexible where-clause in a static view.
This trick only works for the Where clause (not the others) or else you might recieve a "view definition has changed" error message when the corresponding clause changes.
Walter,