Fetch record from sharepoint online to sql server

Total Post:1

Points:7
 604  View(s)
Ratings:
Rate this:

How to fetch data from sharepoint online to sql server table using windows console application ?

Please share code sample....

  1. Post:140

    Points:984
    Re: Fetch record from sharepoint online to sql server

    You should use of microsoft.sharepoint for access data into a datatable for easy calling by using this below class. 

    Method for calling into Database :  

    DataTable x = new DataTable(); 
    x = ClassName.GetList("http://your site URL", "List table name");

    Fetching data in DB from console application and create a new new list item by this below code : 

    Clientdata data = new Clientdata Data("http://SiteUrl");  
    //list name "mindstick"
    List mindstickList = data.Web.Lists.GetByTitle("mindstick");
    // creating a regular list item
    ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
    ListItem newItem = mindstickList.AddItem(itemCreateInfo);
    newItem["Title"] = "Unleash your Imagination";
    newItem["Body"] = "Software Development";
    newItem.Update();
    mindstick.ExecuteQuery();

    I hope ,It would be helpful for you..

    Happy Coding :)

      Modified On Jun-07-2018 03:00:17 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!