Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protecting Tables against power fail - FLUSH doesnt work
Message
From
15/11/2001 23:21:44
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/11/2001 22:11:25
Malcolm Sheldon
Benchmark Consultants
Australia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00582519
Message ID:
00582546
Views:
19
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform