Board index » delphi » 'Index is out of date' Error???

'Index is out of date' Error???

I made an object to handle auto creation of by Paradox 7 database table
files. I checks for fields that have been added or removed.
It works great to make a new table but when I use the feature to add a
field I get a run time error "Index is out of date" I have looks through
all the books and the *.pdf files and the help files, I can't find what
that is.
When I add a field I make a list of all the fields in the table and then
I delete the table and make a new one of the same name only with the new
fields added.
The error happens at run time when I try to activate the Table. If I
remove the instruction to add an Index to the table it does not happen.

Can someone tell me what that is?

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 

Re:'Index is out of date' Error???


I found my error. You can not rename a db file. Some where in the file
it must contain the name of the file. When I tried to activate it, it
would see the name was different and crash. What I do now is I make a
list of all the old and new data fields then I delete the old file and
make a new one of the same name.
I still don't know what that has to do with "date" but it works now so I
is happy. Thanks.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Re:'Index is out of date' Error???


hi

i had exactly the same error... i don't know what caused it, but i think i
must have used Insert wrongly, because when i tried using append, i all
worked for me

  -Kim

god_of_p...@my-deja.com skrev i meddelelsen <7o9l2o$ga...@nnrp1.deja.com>...

Quote
>I made an object to handle auto creation of by Paradox 7 database table
>files. I checks for fields that have been added or removed.
>It works great to make a new table but when I use the feature to add a
>field I get a run time error "Index is out of date" I have looks through
>all the books and the *.pdf files and the help files, I can't find what
>that is.
>When I add a field I make a list of all the fields in the table and then
>I delete the table and make a new one of the same name only with the new
>fields added.
>The error happens at run time when I try to activate the Table. If I
>remove the instruction to add an Index to the table it does not happen.

>Can someone tell me what that is?

>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.

Re:'Index is out of date' Error???


<<god_of_p...@my-deja.com :
I found my error. You can not rename a db file. Some where in the file
it must contain the name of the file. When I tried to activate it, it
would see the name was different and crash. What I do now is I make a
list of all the old and new data fields then I delete the old file and
make a new one of the same name.
I still don't know what that has to do with "date" but it works now so I
is happy. Thanks.

Quote

Well, after your additional findings, I know what causes that that error:
You may actually chande the name of the .db file, it has no internal naming itself. But - the index
files (*.px, *.xg*, *.yg*) are used in conjunction with the .db file. When the .db file is written,
all index files are stamped with a date/time that is close to the .db file. If these timestamps
differ, paradox interprets it as if the index files are no longer up to date.
It seems a little clumsy, but it is DANGEROUS to open a table indexed on a non-updated index. Wrong
records could be edited or deleted, records bay be overwritten, etc. I have seen it, it's ugly....

So, if you want to rename a .db file, you have to rename all index files that belongs to the table
(same name, different extension), and time-stamp them equally.

--

Bjoerge

Other Threads