Board index » delphi » Records not being stored in databases

Records not being stored in databases

Have recently discovered that when a program crashed that the records it
was posting disapeared and the tables was in its orig{*word*7}state.  
The records where being sent to a database using the Tquery component.  It
seems that none of the records are being stored in the application untill
the program is shut down.  Is this a problem with the BDE or am I failing
to carry out some code

Code.

With Catched update on the Tquery set to false.

I,j,k are varibles added here to finish off the code.

With insert_special do
begin
        close;
        prepare;
        params[0].asfloat := i;
        params[1].asfloat := j;
        params[2].asfloat := k;
        execsql;
end;

I feel that the post ommand is needed,  please can anyone help ith this
problem as I do not want to lose large numbers of records if there is a
powere cut as the software will be running 24 hoursa day.

David & James
Bakery Computing.

 

Re:Records not being stored in databases


It seems that data gets really finally written out to the disk later than anyone might think.  The only way I can be sure of accurate data with multiple users looking at data across the network is to use a separate database component.  When the component is closed, the data is really finally written out.  Of course, it still wouldn't be on the disk if I allowed Win95 to write cache (and I don't).

/js

In article <01bc3060$233e2440$0300a8c0@David>, "David & James" <bt...@bakery.co.uk> writes:

Quote
>Have recently discovered that when a program crashed that the records it
>was posting disapeared and the tables was in its orig{*word*7}state.  
>The records where being sent to a database using the Tquery component.  It
>seems that none of the records are being stored in the application untill
>the program is shut down.  Is this a problem with the BDE or am I failing
>to carry out some code

>Code.

>With Catched update on the Tquery set to false.

>I,j,k are varibles added here to finish off the code.

>With insert_special do
>begin
>    close;
>    prepare;
>    params[0].asfloat := i;
>    params[1].asfloat := j;
>    params[2].asfloat := k;
>    execsql;
>end;

>I feel that the post ommand is needed,  please can anyone help ith this
>problem as I do not want to lose large numbers of records if there is a
>powere cut as the software will be running 24 hoursa day.

>David & James
>Bakery Computing.

Other Threads