>Using the CA Builder from Mark McCasland, I have set the property cBaseSelectCmd without a Where clause. I then set the property cSelectCmdFilter which triggers the cBaseSelectCmd_Assign and adds the Where clause to the SelectCmd property. All is appears OK at this point. The SelectCmd appears to have the Where clause.
>
>However when executing oCA.CursorRefresh(), the result set is based on the original SelectCmd, not on the revised SelectCmd with the Where clause.
>
>I have attempted to debug it, and note that the cSelectCmd parameter being passed to some of the Before/After hooks, and the tuDummy parameters passed to custom After Hooks all seem to have the original SelectCmd without the filter, but have not een able to determine the cause ???
This is one of the most greater VFP design error.
You cannnot change the cSelectCmd into the BeforeCursorRefresh.
You can use a parametric fixed select only when you Fill the cursor.
For instance,
if you want all the values NULL,
and then you want to make a refresh with all the values NOT NULL
you have to use a parameter
SELECT * FROM TABLE
WHERE (1=?parameter AND field IS NULL) OR (0=?parameter AND field IS NOT NULL)
Then,
if you want to condition the results with different JOIN
the situation it becomes tragic.