>Hi all
>
>I am using a "dynamic" parameter with my cursoradapter. I'm using the CA in a form like this:
>
>
>thisform.Addproperty('loFilemgmt')
>thisform.loFilemgmt=NEWOBJ('cafilemgmt','ca_pwmisc','',lcWhere)
>thisform.loFilemgmt.Cursorfill(.T.)
>
>
>where lcWhere is "WHERE water=1 AND parks=1" or something like that.
>
>Normally (when I don't require a dynamic parameter), I put this code in the form Load and everything is fine. The problem is that I think I have to create the CA with NEWOBJ in order to use my dynamic parameter which means reloading the CA with Cursorfill(). When I do this, I lose all my grid Controlsources. Is there a way to use CursorRefresh() with a dynamic paramter?
>
>thanks
>
>bonnie
Bonnie,
with dynamic parameters Yes, with dynamic expression ( like lcWhere ) No
because BeforeCursorRefresh is useless
Then, you can CursorRequery() ( as CursorRefresh() ) the cursor with this
[...... WHERE water=?parameters1 AND parks=?parameters2 ... ]
and change parameters1 and/or parameters2
but you cannot to alternate with dynamic Requery these:
[...... WHERE water IS NULL]
[...... WHERE water IS NOT NULL]
This is a incredible design's bug.
Fabio