Subject Re: [firebird-support] Concern with FB
Author Tim
At 14:33 26/05/2005, you wrote:

>Hi Tim,
>
> >>We have had to change out code to protect against
> >>the user switching off the power at the wall socket, for example.
>
>How does one protect (in code) against the power being turned of ?
>
>--
>Regards,
>Grant Brown

1 : make sure that forced writes are ON\
2 : make sure that forced writes are ON (Again)\

In Delphi, there's a 'flushbuffers' method on a post. Call it if you're
making a post after an edit to a table directly.

3 : use transaction control. We have not yet (4 years of usage) had a case
where we have had data corruption due to a power failure. Keep your
transactions as short as possibe.

What you're trying to accomplish is to make sure that nothing stays in the
Windows cache at all, but gets written to disk ASAP.

Regards

Tim


[Non-text portions of this message have been removed]