Board index » delphi » Error: 'Corrupt file - other than header'

Error: 'Corrupt file - other than header'

I get errors :'Corrupt file - other than header.Table:Transaction.DB'.

Reproduceable
fields        type        prim.index    required
When          Timestamp    yes           yes
Terminalid    Integer      yes           yes
Cardnr        Integer      no            no
Amount        money        no            yes

I am testing with an app which inserts records with a time incrementing
1/100th sec:

FieldByName('when').value := i+aStartTime+(1/(24*60*60*100));

If i load the table and scroll from the end back, i get the Corrupt File
error, and no records are displayed anymore, while there are 1 million.

Has the BDE/Paradox any problems with Timestamps in the Primary key??

CU
WS

 

Re:Error: 'Corrupt file - other than header'


Quote
Wim Smit wrote:

> Has the BDE/Paradox any problems with Timestamps in the Primary key??

Only if the timestamps are equal.

If I remember it right, the minimum time step Windows Timer will handle
is 15 milliseconds, so 0.015 seconds.

And you are adding new record in every 0.01 seconds. Maybe this time
margin is too small, and some records are getting the same timestamp
as their Primary key. And that is a big no-no.

Try using Autoincrement Primary key values, and put your Timestamp
values to some other field.

Just quessing, never tested anything this way.

Markku Nevalainen

Other Threads