Article ID: 155936
Article Last Modified on 10/15/2003
* Start of code example
LOCAL nI
CLOSE DATABASES ALL
FOR nI = 1 TO 5
USE HOME() + 'samples\data\customer'
=CURSORSETPROP('buffering',nI)
REPLACE company WITH ALLTR(company) + ' ' + ALLTRIM(STR(nI))
SKIP
USE && Closes table
USE HOME() + 'samples\data\customer'
BROWSE
ENDFOR
REPLACE company WITH SUBSTR(company,1,ATC('1',company,1)-1)
* End
Notice the numeral appended after the company name in the first record,
and then close the Browse window. Do this for each of the five times the
Browse window appears. The numbers 1 through 3 appear, but 4 and 5 do
not. Number 1 is no buffering, 2 and 3 are Pessimistic and Optimistic
Row buffering, and 4 and 5 are Pessimistic and Optimistic Table
buffering.
* Start of code example
LOCAL nI
CLOSE DATABASES ALL
FOR nI = 1 TO 5
USE HOME() + 'samples\data\customer'
=CURSORSETPROP('buffering',nI)
REPLACE company WITH ALLTRIM(company) + ' ' + ALLTRIM(STR(nI))
SKIP
* The following statement is necessary to prevent errors
* with GETNEXTMODIFIED() if table buffering is not used
IF CURSORGETPROP('buffering') > 3
IF GETNEXTMODIFIED(0) > 0 && Checks for any modified records
=TABLEUPDATE(1) && Or whatever you want to do
&& before you close the table
ENDIF
ENDIF
USE && Closes table
USE HOME() + 'samples\data\customer'
BROWSE
ENDFOR
REPLACE company WITH SUBSTR(company,1,ATC('1',company,1)-1)
* End
The changed record is saved, even when table buffering is used.Additional query words: kbdse VFoxWin
Keywords: KB155936