Board index » delphi » Paradox AutoIncrement Corruption

Paradox AutoIncrement Corruption


2007-01-06 06:54:19 AM
delphi96
Hi All,
I have an old application that uses Paradox 7 tables. One of the
tables uses an AutoIncrement field to store a unique ItemID. The
current records in the table start at an ItemID of 3 and go to 314.
When adding a new record, the first new record is assigned 1 and the
second is assigned 2. Of course, when they try to put in the 3rd it
barfs.
I read an earlier post where restructuring was suggested to fix this
but it doesn't work. I use Database Desktop v7 to restructure and the
problem still exists. I even added a new field to make sure that the
restructure actually took place.
Is there another way to fix this table?
Thanks,
Steve
 
 

Re:Paradox AutoIncrement Corruption

Just restructuring is not enough. Restructure and change the field type
from autoinc to integer. Restructure again and change the field type
from integer to autoinc. That should correct the problem.
--
Bill Todd (TeamB)
 

Re:Paradox AutoIncrement Corruption

On 5 Jan 2007 16:12:40 -0800, "Bill Todd" <XXXX@XXXXX.COM>writes:
Quote
Just restructuring is not enough. Restructure and change the field type
from autoinc to integer. Restructure again and change the field type
from integer to autoinc. That should correct the problem.
I tried that an Database Desktop complained that it could'nt
restructure. The error I get is "Field ItemID: existing field type
cannot be converted to requested type". I assumed that was because
the table has records in it and can assign autoincrement values to
existing records. Is this not correct?
Steve
 

Re:Paradox AutoIncrement Corruption

Quote

I tried that an Database Desktop complained that it could'nt
restructure. The error I get is "Field ItemID: existing field type
cannot be converted to requested type". I assumed that was because
the table has records in it and can assign autoincrement values to
existing records. Is this not correct?

Steve
Did the error occur on the autoinc->integer restructure or the
integer->autoinc restructure?
Try rebuilding the table with the table repair program at
www.rksolution.cz and see if that corrects the problem.
--
Bill Todd (TeamB)
 

Re:Paradox AutoIncrement Corruption

On 5 Jan 2007 20:43:02 -0800, "Bill Todd" <XXXX@XXXXX.COM>writes:
Quote
>
>I tried that an Database Desktop complained that it could'nt
>restructure. The error I get is "Field ItemID: existing field type
>cannot be converted to requested type". I assumed that was because
>the table has records in it and can assign autoincrement values to
>existing records. Is this not correct?
>
>Steve

Did the error occur on the autoinc->integer restructure or the
integer->autoinc restructure?
I failed with the integer->autoinc restructure.
 

Re:Paradox AutoIncrement Corruption

Quote

I failed with the integer->autoinc restructure.
It works for me. I think the table is corrupt. Rebuild it with the
table repair program at www.rksolution.cz.
--
Bill Todd (TeamB)