Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why CursorFill() is faster than CursorRefresh() in a CA?
Message
From
03/12/2010 06:19:33
 
 
To
02/12/2010 14:10:48
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Miscellaneous
Thread ID:
01491162
Message ID:
01491653
Views:
57
>Fabio,
>
>Which brings me to a question. Since CursorFill() always makes a new cursor, I usually do this to reload the grid:
>
>
>ThisForm.myGrid.RecordSource = ""
>ThisForm.myGrid.ColumnCount = -1
>
>ThisForm.myGrid.RecordSource = ThisForm.oCursor.Alias   && object reference to the CA
>ThisForm.myGrid.ColumnCount = FCOUNT( ThisForm.oCursor.Alias )
>ThisForm.myGrid.Refresh()
>
>
>Why does it run beserk when I change the ORDER clause? If I change the list of fields (SELECT field1, field2... ) it works always.
>
>Dennis
>

"Beserk" in what sense?
a change in the SELECT ORDER not expected to affect the grid.

try ? to change Grid.Optimize property .

>
>>>Fabio,
>>>
>>>CursorRefresh does not create a copy,
>>>it do a ZAP ("CA: Alias") and fills it

>>>
>>>You are right there. However, if you change SelectCmd, like change or add the ORDER or WHERE clause, CursorRefresh() will still 'respect' the existing SelectCmd and not the new one. If something is changed in SelectCmd, one has to do a CursorFill(), therefore a new cursor will have been created. This will blank the grid.
>>>
>>>Dennis
>>
>>I known.
>>
>>The VFP design to ignore a change of the SelectCmd in the BeforeCursorRefresh,
>>leave as the only possibility the use of parameters in SelectCMD.
>>This is very annoying in some cases.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform