Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread autoinc??
Thu, Mar 29 2007 4:40 AMPermanent Link

andrej bivic
Have a table with about 60.000 records and from a certain on, values of "autoInc" type
field are too high to be integer.
This results as a lost data for all queries. But when I open table, I can see record.
Any advice?
Thu, Mar 29 2007 4:54 AMPermanent Link

>Have a table with about 60.000 records and from a certain on, values of "autoInc" type
>field are too high to be integer.
>This results as a lost data for all queries. But when I open table, I can see record.
>Any advice?

Have tried of repairing table? what value is in "last autoinc value"?
(see it with dbsys)


Tiago Ameller
tiago put_an-a-_in_a_circle sistemasc.net
Sistema, S.C.
Thu, Mar 29 2007 5:36 AMPermanent Link

andrej bivic
tnx for reply. I've tried  repair table. Also inserting records from this, corrupted table
to another, "healty" table with the same structure (this has worked before in such
occasion), but queries ignore those problematic records.

<(Tiago Ameller)> wrote:

>Have a table with about 60.000 records and from a certain on, values of "autoInc" type
>field are too high to be integer.
>This results as a lost data for all queries. But when I open table, I can see record.
>Any advice?

Have tried of repairing table? what value is in "last autoinc value"?
(see it with dbsys)


Tiago Ameller
tiago put_an-a-_in_a_circle sistemasc.net
Sistema, S.C.
Thu, Mar 29 2007 6:14 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

andrej


You don't say which version of DBISAM and in the newer versions the autoinc field is writable to so copying might just copy the higher values.

I can't think of a way to do it in sql but a simple loop from 1 to recordcount replacing the autoinc should work. Finally reset lastautoinc.

Roy Lambert
Thu, Mar 29 2007 11:33 AMPermanent Link

"Robert"

"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:B594BFB7-0672-4079-9880-1D3B16F5DEAC@news.elevatesoft.com...
>
> I can't think of a way to do it in sql

create a new table and insert every field except for the autoinc. this
should work, as long as the autoinc field is not used as a foreign key in
another table.

Robert

Thu, Mar 29 2007 11:37 AMPermanent Link

Andrej Bivic
I use ver 2.12 and autoInc is not writable. Unfortunatly.
Andrej

Roy Lambert <roy.lambert@skynet.co.uk> wrote:

andrej


You don't say which version of DBISAM and in the newer versions the autoinc field is
writable to so copying might just copy the higher values.

I can't think of a way to do it in sql but a simple loop from 1 to recordcount replacing
the autoinc should work. Finally reset lastautoinc.

Roy Lambert
Thu, Mar 29 2007 11:40 AMPermanent Link

Andrej Bivic
It simply skips all the records with "fishy" autoInc.

"Robert" <ngsemail2005withoutthis@yahoo.com.ar> wrote:


"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:B594BFB7-0672-4079-9880-1D3B16F5DEAC@news.elevatesoft.com...
>
> I can't think of a way to do it in sql

create a new table and insert every field except for the autoinc. this
should work, as long as the autoinc field is not used as a foreign key in
another table.

Robert

Thu, Mar 29 2007 11:44 AMPermanent Link

"Robert"

"Andrej Bivic" <andrej.bivic@abitrade.si> wrote in message
news:C254B1CD-F56A-4CDA-B87E-EB7E24829925@news.elevatesoft.com...
> It simply skips all the records with "fishy" autoInc.
>

Try deleting the autoinc field, see what happens.

R

> "Robert" <ngsemail2005withoutthis@yahoo.com.ar> wrote:
>
>
> "Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
> news:B594BFB7-0672-4079-9880-1D3B16F5DEAC@news.elevatesoft.com...
>>
>> I can't think of a way to do it in sql
>
> create a new table and insert every field except for the autoinc. this
> should work, as long as the autoinc field is not used as a foreign key in
> another table.
>
> Robert
>
>

Fri, Mar 30 2007 3:00 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Hi Andrej,

Can you restructure the table to remove the AutoInc,
and then restrucure it again adding the AutoInc back in.

Chris Holland


Andrej Bivic wrote:
> I use ver 2.12 and autoInc is not writable. Unfortunatly.
> Andrej
>
> Roy Lambert <roy.lambert@skynet.co.uk> wrote:
>
> andrej
>
>
> You don't say which version of DBISAM and in the newer versions the autoinc field is
> writable to so copying might just copy the higher values.
>
> I can't think of a way to do it in sql but a simple loop from 1 to recordcount replacing
> the autoinc should work. Finally reset lastautoinc.
>
> Roy Lambert
>
Image