Wiki Home

Undocumented Vfp Sys Functions


Namespace: WIN_COM_API
sys(1018): Hold Index Lock during Tableupdate

? sys(1018) display current status
? sys(1018,1) set on and display new status

? sys(1018,0) set off and display new status
SYS(1104) forces Visual FoxPro to purge unused buffers.

Does anyone know where/how/why this would be useful? - Brad Jones
According to Ms KB Q269284 Offsite link to http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q269284 "Calling this function can improve performance after executing commands that make extensive use of memory buffers. This function is also useful when you are manipulating large tables." (Got this KB ref from VFUG today!) Bill Armbrecht
Yes... but when would one be making extensive use of memory buffers; what commands generally make use of memory buffers? When does it become useful when manipulating large tables, i.e. before or after? How does performance improve? Those are the questions I should have asked. - Brad Jones
How about after you've done a set of large SQL queries and are done with the data it retrieved? VFP will have buffered the data and will then have to determine whether to flush them during subsequent queries. If you KNOW you're moving on to a different set of data, it could be efficient to tell VFP you're done. IMHO Bill Armbrecht

It also very usefull when you are doing performance testing. If you do the same thing over and over again you will be reusing buffered data while in a live application users rarly do the same thing over and over again so the first time performance is more imortant to optimize. Using this function should help. Before I knew about this I used a memory defragmentation tool (MemTurbo) which works quite well too. - Maurice De Beijer

See Also: Function Sys 1018 Function Sys 1104
Contributors Carl Karsten MarkusWinhard, Maurice De Beijer Brad Jones Bill Armbrecht
Category Undocumented VFP Functions
( Topic last updated: 2001.11.29 06:40:41 AM )