I have five columns, the first is an int identity auto-incrementing field, and the next four are varchar(xx).
I am simply trying to do the first insert into the table, and I get an error message that says:
Cannot insert duplicate key row in object 'dbo.tblFormsOfTests' with unique index 'IX_col2to5tblFormsOfTests
The statement has been terminated.
So I am thinking maybe I'm not inserting in regards to the identity field because I don't include it as the first field?
I thought if I just insert the values for fields 2 through 5, that SQL Server 2005 will automatically insert the incremented value for the first field.
What should I do??
By the way there isn't any record like the one below already in the table.
"INSERT INTO " +
"tblFormsOfTests(multiplicity, instrument, test_type, resides_in_assembly) " +
"VALUES('xx', 'yy', 'zz', 'ff');";