Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic parameter with cursoradapter
Message
From
24/03/2005 03:27:10
 
 
To
24/03/2005 00:56:41
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00998757
Message ID:
00998768
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform