Delphi file compatibility 
Author Message
 Delphi file compatibility

Hi.
First time post, so please excuse it if this is painfully obvious.
I'm a university student, and we have a stage 2 assignment. It's creating a
small table and accessing it through a DBGrid, then populating a few bits
and pieces. I've done that, and it works fine (though I'm sure it could be
coded more efficiently).
It needs to be compatible with the .db file from a model application.
Here's where it gets difficult. Half the time it starts up fine. The other
half, I get the error message telling me the index is out of date. Please
... does
anyone have any idea what could be causing this, and why it is only
intermittent?
Yours in frustration...


Wed, 18 Jun 1902 08:00:00 GMT  
 Delphi file compatibility
Looks like you're not updating the indexes, or cancel the program before all
changes have been written. You'll get an index-out-of-date whenever changes
have been made to a key-field (add or delete records, change key-info so
that the index doesn't match anymore).

Alex



Quote:
> Hi.
> First time post, so please excuse it if this is painfully obvious.
> I'm a university student, and we have a stage 2 assignment. It's creating
a
> small table and accessing it through a DBGrid, then populating a few bits
> and pieces. I've done that, and it works fine (though I'm sure it could be
> coded more efficiently).
> It needs to be compatible with the .db file from a model application.
> Here's where it gets difficult. Half the time it starts up fine. The other
> half, I get the error message telling me the index is out of date. Please
> ... does
> anyone have any idea what could be causing this, and why it is only
> intermittent?
> Yours in frustration...



Wed, 18 Jun 1902 08:00:00 GMT  
 Delphi file compatibility


Quote:
> Hi.
> First time post, so please excuse it if this is painfully obvious.
> I'm a university student, and we have a stage 2 assignment. It's creating
a
> small table and accessing it through a DBGrid, then populating a few bits
> and pieces. I've done that, and it works fine (though I'm sure it could be
> coded more efficiently).
> It needs to be compatible with the .db file from a model application.
> Here's where it gets difficult. Half the time it starts up fine. The other
> half, I get the error message telling me the index is out of date. Please
> ... does
> anyone have any idea what could be causing this, and why it is only
> intermittent?
> Yours in frustration...

The message indicates that the indexes have not been updated to reflect a
change made to the table. This often happens if a program terminates
abnormally after changing the table. One mechanism for reducing the problem
is to call the table's FlushBuffers method immediately after each update is
posted. You can do this using the table's AfterPost event. (In single user
environments the BDE caches table changes which results in superior
performance. Calling FlushBuffers after each post forces the BDE to write
updates immediately.)


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Report Smith, Delphi 1, and Paradox 9 compatibility

2. Announcement: Delphi VCL compatibility available for Virtual Pascal/2 NOW

3. Compatibility problems with delphi (16bit) SQL Links and

4. BDE Compatibility (32 bit with Delphi 1.0)?

5. Pascal & Delphi Compatibility

6. Japanese compatibility of Access/VB vs. Paradox/Delphi

7. COMPATIBILITY BETWEEN QBE AND SQL

8. Compatibility

9. Compatibility of Companion

10. Question: Backward compatibility TP 7.0 & TP 6.0

11. AMD compatibility

12. AMD-Pascal compatibility

 

 
Powered by phpBB® Forum Software