Using SSIS to write to SharePointhttps://sqldatapartners.com/wp-content/themes/crocal/images/empty/thumbnail.jpg150150Carlos L ChaconCarlos L Chaconhttps://secure.gravatar.com/avatar/5e3365b6a313f63d0ad1fd6748a46345?s=96&d=mm&r=g
I was experimenting with the new (to me) SharePoint Source and Destination utilities available in SSIS and came across this error
Error: 0x0 at Data Flow Task, SharePoint List Destination: Error on row ID=”2″: 0x81020016 – List item referred to in the request does not exist.
What I was trying to do was write a result set to a SharePoint List. What I didn’t realize, was in the column mapping if you want to INSERT a row into Sharepoint you can’t map the ID column, you have to let SharePoint assign that itself. It is when you update that you map the SharePoint ID column.
This example will all the Records in my source table to be inserted into a list. If I wanted to update a record, I map the ID column and all the columns that I map would update with the source data.
What is a little weird is that if you want to keep the source table and the SharePoint list in synch, the ID columns have to match up or when you update the record, the source table will override what is in the SharePoint list. For my solution, it was not a big deal, but I could see it biting me one day.
Imagine what’s possible with a dedicated SQL specialist on your team.
SQL Data Partners has been acquired by Marathon Consulting, a Virginia-based Information Technology Consulting and Digital Marketing firm. We are in the process of integrating our team and services into Marathon as of May, 2023.