>Hi Fabio,
>
>You can change SelectCmd only before calling CursorFill method. Every subsequent CursorRefresh will use same select command (and you should agree that if you change selected fields in your select command this would lead to a big mess).
Hi Venelina,
I cannot agree.
This is probably what they have thought those of the VFPT.
But this argument is inconsistent.
Example:
SelectCmd = [ SELECT * FROM... ]
Now:
time(1): the CursorFill created the Cursor
time(2): a ALTER TABLE change one or many fieldnames
time(3): CursorRefresh send the [ SELECT * FROM ...] and the datasource
return a different "fieldnames list" Metadata.
Can VFPT control this ? No.
The VFPT must stop to think next to situations
where the instruments that create go well or they do not go well;
it must only make the instruments and enough.
Otherwise, every developer that it wants to make something that the VFPT has not thought,
is forced to leave again from zero.
They are I that I must use them well or badly.
>So what you can do in your case is to write a "compound" where clause
>
WHERE (?ThisForm.Checkbox.Value AND tagField IS NULL) OR (?!ThisForm.Checkbox.Value AND tagField IS NOT NULL)
>This is just the idea, but not a tested code, so you should play arrownd it.
>
No as simple:
WHERE (1=?CAST(IIF(ThisForm.Checkbox.Value,1,0) AS I) AND tagField IS NULL) ....
If you have 20 checkbox ....
Regards
Fabio