General information
Category:
The Mere Mortals .NET Framework
I am experiencing an error when saving records to a SQL table. The primary key of the table is eqc_pk, the field type is uniqueident, is RowGuid is set to yes.
on my business object I have set the RetrieveAutoIncrementPK to false
I can save one record (if I check the SQL table, the record is properly inserted with a GUID); however, if I attempt to create a second record during the same session I recieve an error:
"Column 'eqc_pk' is constrained to be unique. Value '' is already present."
If I have the RetrieveAutoIncrementPK to true, I cannot save the first record, I recieve the following error:
Cannot insert the value NULL into column 'eqc_pk', table 'ArbyEqp.dbo.EquipmentClass'; column does not allow nulls. INSERT fails.
The statement has been terminated.
I prefer to have SQL create the GUID, but am unsure how to set MM to accomplish this.
TIA,
Russ Gonring
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only