>> Also, locate for .f. will go beyond EOF and get us nowhere. There's a reason why Go Reccount() should be used, because the internal behavior of the RecCount() function forces an update of the record counter in the header - in some cases I know it was used (in VFP5, but the behavior may still be there) to avoid the "user A overwrites the new record added by user B" error. For all I know, we could do this on the first record as well, but I was sort of worried whether it would endure the wear and tear :). Actually, this should force the last record to be written, specially as this opens the table without buffering.
>I have a big problem with behaviour like "user A overwrites the new record added by user B"(with his new record) and get index wrong sametime; I try to put FLUSH after END TRANSACTION but did not solve the problem; If I put a GO RECNO() the record counter is forced to update?
Buna ziua
I just worked with the guy who found this trick - and it's RecCount(), not RecNo(). Actually, you didn't have to Go Reccount(), just calling the function is supposed to be sufficient. I've found that bit of code in a framework later, which means this solution was accepted. Sorry that I can't mention names.
Go RecNo() (or Skip 0) was used for reshaking the relations, i.e. if you weren't sure your relations still held because you changed the things while still sitting on the record, this reestablished them.