Link to home
Start Free TrialLog in
Avatar of RalphPorter
RalphPorter

asked on

Corrupt Index Delphi 4/Paradox7

Hi,

   To set the scene, I have a DBgrid and input fields below the source is an SQL Query object. The grid/input is SQL based to allow reselection according to criteria etc. This one screen therefore supplies enquiry,insert and update facility over one table.

My problem is that on rare occasions the underlying table is reporting a corrupted index but I can never reproduce it.

I'm pretty sure that I've written the application in such a way that it wont leave an update half way through etc

I have observed the accumulation of _QSQ?.DB files, these I presume to be temporary files created for the SQL view?
Generally these files vanish as the application is closed but this is not always happening. On one occasion I was informed that a power cut had occured - at least six records prior to the cut had not been recorded and on restarting the system the index was corrupt, I can understand why an index corruption may have ocurred here but why the missing data?

 So to ask specifics:

1) Can anyone tell me what _QSQ.DB files are?

2) When using an SQL Query object to update a data file is the data cached or written directly to disk (I have CachedUpdates=False). How can I ensure it is written straight to disk?

3) Is it best practice to explicitly open and close tables/Queries at application start/finish. Delphi always seems to handle this for me, I think :)

4) what is the most likely cause of Index corruption? I presume an uncompleted update.

5) Is it just me :)

Thanks Folks,

Regards,


        Ralph.
ASKER CERTIFIED SOLUTION
Avatar of nnbbb09
nnbbb09

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RalphPorter
RalphPorter

ASKER

Hi Jo,

     Sorry for the delay, I couldn't seem to get on the server for some reason. Anyway thanks for the informative answer I have taken your advice and now of course I must wait to see if the problem is resolved or not. Thanks again.

Best Regards,

        Ralph.