Hello,
I have SQL Server Server Man Studio Express 2005, currently having a problem with an auto populated field.
Basically I have a number populated everytime a new asset is added to my database, but at the moment the firled does not increment by 1 as I would like it to. Seems to assign the same number as a item already in the database and I have to go into the back end and change it manually.
Anyone know how this is easly sorted, the asset ID is not the primary key. Just for your info at the moment 'Identity Spec' is set to 'NO'.
Many thanks, Andrew
How are you currently trying to auto populate the number if Identity is set to No?
--Uncle Pete
|||This is a good question, sorry i only recently started using this software as inherited it of another person so very new to it.|||I have just checked and it will not allow me to change the Identity Spec to 'Yes'? Default value or binding is set to ((0)).|||What is the datatype of the field?
If it is set to INT then you should be able to set the identity to yes.
|||Hello, yes it is set to INT but dosen't seem that I can alter it?
|||If you look at the identity field, you will see a plus sign, expand that. There you will be able to select Yes and set the seed value and increment. Be sure to set the seed value higher than what ever the highest current value is.
Also I see you said that default was set to (0), delete that, as it will conflict with the indentity.
|||Thank you for your reply but I still cannot change the Identity Spec field?
It is setup the follwoing way:
Allow Nulls: Yes
Datat Type: int
Value or binding: ((0))
Condensed data type: int
Deterministic: Yes
Indexable: Yes
Full text Spec: No
Identity Spec: NO
Size: 4
everything else set to No or blank.
Many thanks, Andrew
No comments:
Post a Comment