Developer forum

Forum » Integration » RE: Adding content to DW with SQL

RE: Adding content to DW with SQL

Keld Gøtterup
Reply

when trying to add items to an itemtable in DW SQL server.
im do not have any trouble adding the items from sql, the problem starts when i want to create a new item through DW, then i get a "Violation of PRIMARY KEY constraint, Cannot insert duplicate key in object"
Is there some way to fix it so DW knows what id to place?

 


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Keld

After you import items using SQL, you give them an ID.

If you use the same ID syntax as Dynamicweb, you need to update the ItemTypeId table so that DW will not generate an ID that you used when importing.

You do not have to use our IDs. You could give your imported items id like "i123" so that you can se on the id that it was imported (the i). Then Dynamicweb will number the items created in the UI the normal ids.

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum