I am using the template from the documentation for How to Update List Items on a Sharepoint List using C#. I am using the input rows from a SQL statement source within SSIS.
I have the Microsoft.Sharepoint.Client reference set up. Here is my code
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
string siteUrl = "http://MyServer/sites/MySiteCollection";
ClientContext clientContext = new ClientContext(siteUrl);
SP.List oList = clientContext.Web.Lists.GetByTitle("Enrollment");
ListItem oListItem = oList.Items.GetById(Row.ID);
oListItem["STATUS"] = Row.Status;
oListItem.Update();
clientContext.ExecuteQuery();
}
But I get the error message on the line ListItem oListItem = oList.Items.GetById(Row.ID);
'List' does not contain a definition for 'Items' and no extension method 'Items' accepting a first argument of type 'List' could be found (are you missing a directive or assembly reference?
I have the namespaces set up correctly
using Microsoft.SharePoint.Client;
using SP = Microsoft.SharePoint.Client;
What am I missing?