Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Protecting Tables against power fail - FLUSH doesnt work
Message
De
15/11/2001 23:21:44
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
15/11/2001 22:11:25
Malcolm Sheldon
Benchmark Consultants
Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00582519
Message ID:
00582546
Vues:
20
>I have been trying to find a way of properly committing/protecting data to tables in the event of a power fail.

The trick I'm investigated lately is, given a table, would look like this:
lparam cAlias
cDbf=dbf(cAlias)
select 0
use (cDbf) alias __temp again
go recc()
cFld1=fields(1)
cVal1=value(cfld1)
blank field (cfld1)
replace (cFld1) with (cVal1)
use
return
I was doing some heavy thrashing in an app which was doing some very nasty things, and I expected regular crashes (though I didn't get as many as I expected). Using this technique, I always had the last records right, i.e. never lost whatever I had there at the moment I called this method. May be a little slow, but seems to work.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform