Fetch record from sharepoint online to sql server

Total Post:1

 694  View(s)
Rate this:

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

Please share code sample....

  1. Post:140

    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";

    I hope ,It would be helpful for you..

    Happy Coding :)

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