This topic is locked
[SOLVED]

 AutoNumber In SQL

3/7/2005 6:02:27 PM
ASPRunnerPro General questions
author

Hello, I have a SQL Database that I pull my data from, however when I go to add a new row I need to add a number to the Index. Access did this automatically but SQL does not, Im thinking I have to add it into the SQL code from the add new page but I am not sure any help would be greatly appreciated. Thank You.

Sergey Kornilov admin 3/8/2005

Andy,
in MS SQL Server you need to set field type to int and mark it as Identity field to enable autonumbering. You can do this using SQL Server Enterprise Manager.

500206 3/8/2005

Worked Like a charm, thank you much.

Also, I have asset tracker looking at a view in this database, When I go to update a row, the "required field" of asset tracker will not update but the rest of the items will. ANy thoughts?

Sergey Kornilov admin 3/9/2005

Andy,
could you explain what is the "asset tracker looking at a view in this database"?

500207 3/17/2005

I have same problem with autonumber in SQL but Ican't figure out the part with identity.Could some one tell me ?Thanks.

Sergey Kornilov admin 3/17/2005

Open SQL Server Enterprise Manager and proceed to required database table. Right click on it and choose Design. Set field type to int. Below on the same screen set Identity property to Yes.
This is it.

500208 3/17/2005

So easy...
Thanks Sergey!