>>>Hi,
>>>
>>>Is there a generic way so that I can zap all records (already) loaded in a parameterized view without affecting the underlying source table(s) as though the view is just opened with NoDataOnLoad = .T. from the DE?
>>>
>>>My current way is try to figure out filter variables in the view and feed one of them with certain value so that when I requery() the view, that filter will cause the view to load nothing. But I am curious about whether there is a simpler and more generic way that can be applied on any parameterized view?
>>>
>>>Please, any clue will be very much appreciated!
>>
>>The correct answer:
http://my.advisor.com/doc/SILVL14-01>
>Of course, the purist can't but notice that you explicitly set safety ON, disregarding any setting in place before this code runs... tsk tsk tsk.
>
>But actually the trick is very neat and works with SPT too.
Thanks. That same purist would, despite Ceil's kindness, scold me for not resetting bufferring and sendupdates to their original values too!
Requery does much more than ZAP. I have another trick. Use Create Cursor instead of USE viewname or SPT to get an empty cursor for binding controls. The more complex the view, the better this trick performs. I have one form that loads in less than 2 seconds by doing that versus more than 10 seconds the other way. It's 4375 times faster than one of my biggest queries.