Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protecting Tables against power fail - FLUSH doesnt work
Message
From
03/12/2001 21:48:49
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
03/12/2001 06:10:31
Cristian Tenea
Aquila Part Prod Com
Ploiesti, Romania
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00582519
Message ID:
00589045
Views:
51
>> 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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform