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.

Comments

  1. Thanks for sharing, nice post! Post really provice useful information!

    An Thái Sơn chia sẻ trẻ sơ sinh nằm nôi điện có tốt không hay võng điện có tốt không và giải đáp cục điện đưa võng giá bao nhiêu cũng như mua máy đưa võng ở tphcm địa chỉ ở đâu uy tín.

    ReplyDelete

Post a Comment

Popular posts from this blog

OverTheWire[.com] Natas Walkthrough - JUST HINT, NO SPOILERS

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

SOLVED The item could not be indexed successfully because the item failed in the indexing subsystem