Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread how to reset RecordID?
Mon, Jan 9 2017 3:05 PMPermanent Link

kamran

Hi

So there is an automatically created field in every dbisam table called RecordID

1. How to reset it,  so that the first RecordID value is 1?

I just want to use it to generate a product sequence in another field in the table

Regards

Kamran
Tue, Jan 10 2017 2:29 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

kamran


I don't know if you can, optimising the table might do it.

Its a bad idea anyway unless you can guarantee that the sequence you want is the same as RecordID which may not be the case depending on sorting or data entry.

Roy Lambert
Tue, Jan 10 2017 10:15 AMPermanent Link

kamran

HI Roy

Yes ... I tried optimizing .. as it was the first thing that came to mind too ...

I just need it to start from 1 as that makes a lot of sense in terms of the product no start sequence.
Which is what i want to make use of  to create a key in another field in same table.

I wonder where it stored .. or where it remembers where it currently is.
Then it might be possible to change it by force!!

Perhaps just picks up the last used and add 1?

Thanks

Kamran

Roy Lambert wrote:

kamran


I don't know if you can, optimising the table might do it.

Its a bad idea anyway unless you can guarantee that the sequence you want is the same as RecordID which may not be the case depending on sorting or data entry.

Roy Lambert
Tue, Jan 10 2017 10:19 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Hello,

What you are looking for is perhaps an 'AutoInc' type field.

--
Fernando Dias
[Team Elevate]
Tue, Jan 10 2017 1:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kamran,

<< So there is an automatically created field in every dbisam table called RecordID

1. How to reset it,  so that the first RecordID value is 1?

I just want to use it to generate a product sequence in another field in the table >>

Is the RecordID already used to link to other tables ?  If not, then Fernando's idea is best - just add a *new* AutoInc field and use it to link to the other tables.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Jan 10 2017 6:11 PMPermanent Link

kamran

Hi thanks to everyone.

I was hoping to use the existing RecordID for the purpose without having to recreate another field.
It appears that I might not be able to do so, and that its better to create a new autoinc field as suggested.

I was just trying to be efficient for a change  !!

Cheers.

Kamran

Tim Young [Elevate Software] wrote:

Kamran,

<< So there is an automatically created field in every dbisam table called RecordID

1. How to reset it,  so that the first RecordID value is 1?

I just want to use it to generate a product sequence in another field in the table >>

Is the RecordID already used to link to other tables ?  If not, then Fernando's idea is best - just add a *new* AutoInc field and use it to link to the other tables.

Tim Young
Elevate Software
www.elevatesoft.com
Image