Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why CursorFill() is faster than CursorRefresh() in a CA?
Message
From
02/12/2010 00:31:50
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
01/12/2010 09:37:44
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:
01491508
Views:
45
>>>>>>>>>>Why CursorFill() is faster than CursorRefresh() in a CA?
>>>>>>>>>>Note that both functions returns the same number of records and uses the same SelectCmd...
>>>>>>>>>
>>>>>>>>>CursorFill()
>>>>>>>>>create the CA.Alias dbf
>>>>>>>>>
>>>>>>>>>CursorRefresh()
>>>>>>>>>1. create a temp dbf
>>>>>>>>>2. copy temp.dbf into the CA.Alias dbf
>>>>>>>>>
>>>>>>>>>the step 2. can require enough time,
>>>>>>>>>and this force the dbf structure to not change
>>>>>>>>
>>>>>>>>Hi Fabio,
>>>>>>>>
>>>>>>>>are your shure?
>>>>>>>>
>>>>>>>>the DBF() is someting like SYS(2015)+'.DBF'
>>>>>>>>I can see DBF(CA.ALIAS) change with every CursorRefresh.
>>>>>>>>I run in this indexing a CA / View after Requery / CursorRefresh
>>>>>>>>
>>>>>>>>Agnes
>>>>>>>
>>>>>>>try to attach the CA.alias to a Grid.
>>>>>>
>>>>>>Done
>>>>>>DBF() changes with every cursorrefresh Simple to see on Statusbar
>>>>>>
>>>>>dbf here does not change.
>>>>>
>>>>>>No idea why the grid should make a difference
>>>>>
>>>>>Grid do not like if recordsource file handle change
>>>>
>>>>I have no idea what you are refreing too.
>>>>I use a CA bound to a grid with Cursorrefresh since the time the CA was introduced. I have replaced the views (formerly used) with CA and have no problems with grids at all.
>>>
>>>That is what Fabio means - as you have no problems with grids, CA must at least "shimmy" the "Safe Select" needed for normal cursors - you have to zap the Bound source and append from the new data...
>>
>>So this means the grid uses a copy of the DBF() ?
>
>To have a good performance, the Grid internally maintains a list of records displayed
>and other structures related to the grid's recordsource dbf ;
>the grid uses the file handle opened by VFP.
>
>If the file disappears from the file system, the RecordSource becomes invalid and VFP,
>instead of recovery the situation, VFP takes away from the grid.
>
>Try to ZAP,PACK,CursorFill() a Recordsource ...
>
>Then a cursor binded to a grid must maintain the appropriate file dbf

Hm
I never had a need to do one of the operations above against a grid. It's just insert delete update CursorRefresh.

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform