CreateTerm / CreateLabel error

in sharepoint 2013 taxonomy, i tried to add terms to an existing TermSet.
the code i used gave me an arror

                string example = txtExample.Text;
                Term t = selectedT.CreateTerm(example, 1037);
                t.CreateLabel(example, 1037, true);

where selectedT is just another term.

the error i got
"Violation of PRIMARY KEY constraint IX_ECMTermLabel_PartitionIdTermIdLCIDLabel Cannot insert duplicate key in object dbo.ECMTermLabel The duplicate key value is (0c37852b-34d0-418e-91c6-2ac25af4be5b, 607, 1037, 33)"

the solution was NOT using CreateLabel.


Popular posts from this blog

Asp.Net Ending Response options, Response.End() vs CompleteRequest()

c# Service Play Sound with NAudio example by Moshe

JS/JQ simulate Enter event