Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor Adapter - CursorRefresh
Message
From
20/07/2005 02:45:44
 
 
To
19/07/2005 20:53:46
Steve Buttress
Steve Buttress Software Consulting
Bloomington, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01034076
Message ID:
01034133
Views:
23
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform