Discussion:
VFP 8 Index does not match the table
(too old to reply)
Greg
2003-12-02 04:22:13 UTC
Permalink
I have started to get this error since upgrading to VFP8.
Service pack 1 fixed some of the instances but a few still
remain, the error is:-

Index does not match the table. Delete the index file and
re-create the index (Error 114)

It usually occurs on buffered tables during tableupdate,
usually when the table is also opened in another work area
under a different alias. When i browse the tables at the
point of the error a record is missing from the table.
However, when i close the table and reopen it the record
appears. Re-creating the index does not help. I suspect
it is the temporay index that is being used is corrupted.
Does anybody know of a fix?
Martin Lam
2003-12-02 04:53:30 UTC
Permalink
Hi Gerg,

I got the same message just an hour ago. I think it was because the files
for database container have corrupted. Luckily, I have the backup. By
replacing the 3 files: ".DCX", ".DCT",".dbc" with my backup, the problem has
been fixed.

I am not sure if there could be more than one cause for this error, however.

Best regards,
Martin Lam
Post by Greg
I have started to get this error since upgrading to VFP8.
Service pack 1 fixed some of the instances but a few still
remain, the error is:-
Index does not match the table. Delete the index file and
re-create the index (Error 114)
It usually occurs on buffered tables during tableupdate,
usually when the table is also opened in another work area
under a different alias. When i browse the tables at the
point of the error a record is missing from the table.
However, when i close the table and reopen it the record
appears. Re-creating the index does not help. I suspect
it is the temporay index that is being used is corrupted.
Does anybody know of a fix?
greg
2003-12-02 05:23:16 UTC
Permalink
Martin thanks for suggestion. However i have done some
more testing and think its a VFP8 issue as i don't get the
same problem when i run it under VFP7
-----Original Message-----
Hi Gerg,
I got the same message just an hour ago. I think it was
because the files
for database container have corrupted. Luckily, I have
the backup. By
replacing the 3 files: ".DCX", ".DCT",".dbc" with my
backup, the problem has
been fixed.
I am not sure if there could be more than one cause for
this error, however.
Best regards,
Martin Lam
Post by Greg
I have started to get this error since upgrading to
VFP8.
Post by Greg
Service pack 1 fixed some of the instances but a few
still
Post by Greg
remain, the error is:-
Index does not match the table. Delete the index file
and
Post by Greg
re-create the index (Error 114)
It usually occurs on buffered tables during tableupdate,
usually when the table is also opened in another work
area
Post by Greg
under a different alias. When i browse the tables at
the
Post by Greg
point of the error a record is missing from the table.
However, when i close the table and reopen it the record
appears. Re-creating the index does not help. I suspect
it is the temporay index that is being used is
corrupted.
Post by Greg
Does anybody know of a fix?
.
Gene V
2003-12-02 13:44:44 UTC
Permalink
check the setting of STRICTDATE. it can generate this error if you have
an index tag that doesn't comply with the strictdate format.
Post by greg
Martin thanks for suggestion. However i have done some
more testing and think its a VFP8 issue as i don't get the
same problem when i run it under VFP7
-----Original Message-----
Hi Gerg,
I got the same message just an hour ago. I think it was
because the files
for database container have corrupted. Luckily, I have
the backup. By
replacing the 3 files: ".DCX", ".DCT",".dbc" with my
backup, the problem has
been fixed.
I am not sure if there could be more than one cause for
this error, however.
Best regards,
Martin Lam
Post by Greg
I have started to get this error since upgrading to
VFP8.
Post by Greg
Service pack 1 fixed some of the instances but a few
still
Post by Greg
remain, the error is:-
Index does not match the table. Delete the index file
and
Post by Greg
re-create the index (Error 114)
It usually occurs on buffered tables during tableupdate,
usually when the table is also opened in another work
area
Post by Greg
under a different alias. When i browse the tables at
the
Post by Greg
point of the error a record is missing from the table.
However, when i close the table and reopen it the record
appears. Re-creating the index does not help. I suspect
it is the temporay index that is being used is
corrupted.
Post by Greg
Does anybody know of a fix?
.
Igor Korolyov
2003-12-02 15:39:42 UTC
Permalink
Hi, Greg!
You wrote on Mon, 1 Dec 2003 20:22:13 -0800:

G> I have started to get this error since upgrading to VFP8.
G> Service pack 1 fixed some of the instances but a few still
G> remain, the error is:-

G> Index does not match the table. Delete the index file and
G> re-create the index (Error 114)

G> It usually occurs on buffered tables during tableupdate,
G> usually when the table is also opened in another work area
G> under a different alias. When i browse the tables at the
G> point of the error a record is missing from the table.
G> However, when i close the table and reopen it the record
G> appears. Re-creating the index does not help. I suspect
G> it is the temporay index that is being used is corrupted.
G> Does anybody know of a fix?

This error arise in the next scenario:

Session1 - table opened in shared mode and some record is RLOCKed. Buffering
doesn't matter

Session2 - the same table is opened in shared mode and buffering is set to 5
(table optimistic). SET REPROCESS is set to something non-auto, say to 1.
Not to 0 or -1 or -2.
We can modify the record that is rlocked in 1-st session, but upon
tableupdate we'll get error 109 - "Record is user by another" - that's OK.
Then if we'll try to modify this record in any way (even simple REPLACE
SomeField WITH SomeField) and try to commit this record SECOND time - we'll
get error 114...
In previous versions of VFP we don't get error 114 (every time we'll get
error 109), BUT index corruption will take place!!! Just try to modify key
(indexed) field, SET ORDER TO correcponding tag, made the abovementioned
actions with one addition : <change_field>-TABLEUPDATE-(skip 1 and skip -1
or pull record pointer in any other way)-<change_field>-TABLEUPDATE after
that you'll end with corrupter index (but not really corrupted CDX, but
rather corrupted in_memory view of index file) - say SCAN ALL + ? keyfield,
RECNO() + ENDSCAN - will show "duplication" of affected record like
1-2-2-3-4-..., or even - "cycling", i.e. some records will appear
infinitely, say 1-2-3-2-3-2-3-... depending on how you alter key field first
and second time.
So I'd say that now VFP behave more correct, generating error 114

How can one avoid this situation - you'll have:
a. Not to modify uncommited record in any way, between consecutive
tableupdates()
b. Make Tablerevert() if you'll get Tableupdate() error # 109 - it will
restore index file, so you can continue editing and saving attempts.
c. Combine variant b. with less or more complex wrapper - not to lose your
uncommited changes because of record being locked in the time of
tableupdate(). Something like this:

LOCAL oTempRec
SCATTER NAME oTempRec && FIELDS fldList created with the use of
GETFLDSTATE(-1)
* to include only modified records
TABLEREVERT()
GATHER NAME oTempRec && Or corresponding INSERT FROM or APPEND BLANK
* for newly added records

Note that <change_field>-<change_field>-...-<change_field>-TABLEUPDATE()
doesn't produce this situation.

--
WBR, Igor
Greg
2003-12-04 02:56:00 UTC
Permalink
Thanks Igor. I will digest the advice and see how we go,
thanks

Greg
-----Original Message-----
Hi, Greg!
G> I have started to get this error since upgrading to
VFP8.
G> Service pack 1 fixed some of the instances but a few
still
G> remain, the error is:-
G> Index does not match the table. Delete the index file
and
G> re-create the index (Error 114)
G> It usually occurs on buffered tables during
tableupdate,
G> usually when the table is also opened in another work
area
G> under a different alias. When i browse the tables at
the
G> point of the error a record is missing from the table.
G> However, when i close the table and reopen it the
record
G> appears. Re-creating the index does not help. I
suspect
G> it is the temporay index that is being used is
corrupted.
G> Does anybody know of a fix?
Session1 - table opened in shared mode and some record is
RLOCKed. Buffering
doesn't matter
Session2 - the same table is opened in shared mode and
buffering is set to 5
(table optimistic). SET REPROCESS is set to something non-
auto, say to 1.
Not to 0 or -1 or -2.
We can modify the record that is rlocked in 1-st session,
but upon
tableupdate we'll get error 109 - "Record is user by
another" - that's OK.
Then if we'll try to modify this record in any way (even
simple REPLACE
SomeField WITH SomeField) and try to commit this record
SECOND time - we'll
get error 114...
In previous versions of VFP we don't get error 114 (every
time we'll get
error 109), BUT index corruption will take place!!! Just
try to modify key
(indexed) field, SET ORDER TO correcponding tag, made the
abovementioned
actions with one addition : <change_field>-TABLEUPDATE-
(skip 1 and skip -1
or pull record pointer in any other way)-<change_field>-
TABLEUPDATE after
that you'll end with corrupter index (but not really
corrupted CDX, but
rather corrupted in_memory view of index file) - say SCAN
ALL + ? keyfield,
RECNO() + ENDSCAN - will show "duplication" of affected
record like
1-2-2-3-4-..., or even - "cycling", i.e. some records
will appear
infinitely, say 1-2-3-2-3-2-3-... depending on how you
alter key field first
and second time.
So I'd say that now VFP behave more correct, generating
error 114
a. Not to modify uncommited record in any way, between
consecutive
tableupdates()
b. Make Tablerevert() if you'll get Tableupdate() error #
109 - it will
restore index file, so you can continue editing and
saving attempts.
c. Combine variant b. with less or more complex wrapper -
not to lose your
uncommited changes because of record being locked in the
time of
LOCAL oTempRec
SCATTER NAME oTempRec && FIELDS fldList created with the
use of
GETFLDSTATE(-1)
* to include only modified records
TABLEREVERT()
GATHER NAME oTempRec && Or corresponding INSERT FROM or
APPEND BLANK
* for newly added records
Note that <change_field>-<change_field>-...-
<change_field>-TABLEUPDATE()
doesn't produce this situation.
--
WBR, Igor
.
Loading...