i have a field in my database as an autonumber now that i delete that field from my programme the auto number is not in the correct order and the numbers are all off . . .

is there a way to correct this besides changing my field into a number?

Recommended Answers

All 5 Replies

Is that an independent stand alone field or has any dependency with data in the same / other table ?

its an independent field

What is the current definition of the field? And if the numbers are off because you deleted the field from your program then how is it auto number?

the field definition is just a number

When you say the numbers are off I presume that, for example, you had 100 records numbered 1-100, then you deleted the last ten leaving you 1-90, then the next record you added had number 101? This is normal for auto number fields. If you want to change this then you should remove the auto number attribute and calculate the next available number yourself by

SELECT MAX(fldNum)+1 AS nextfldNum
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.