I have entity which consist of 2 fields (with unique index ticked) to generate unique record text+number, however how it is possible that somehow in the database there is duplicate text+number combination?
Thank you for your insight.
Where these records by accident already present BEFORE you activated the unique index on the 2 fields?
I use intensively unique indexes on combinations of fields, and this always works as designed.
Just to be sure: you are aware of the fact that the "combination" of the 2 fields will be unique, not the 2 fields individually.
I would suggest that you delete all records in the table and simply try again.
paul van bladel
the unique indexes has been ACTIVATED on design time BEFORE inserting any records.
yes I am aware that using 2 unique indexes combines the fields as unique.
I have further investigated the issue and it only happens if the number field is ticked as required.
However I use on inserting event to generate number.
But I tried this with when the field is not ticked as required and when I tried to insert the record I received warning that there is already existing record with same indexes.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?