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 :)