Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Guid
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Guid
Miscellaneous
Thread ID:
01062064
Message ID:
01062064
Views:
57
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
Map
View

Click here to load this message in the networking platform