locked
Getting Check In Comment from SharePoint list into Access linked table RRS feed

  • Question

  • I have been scouring the web trying to find the easiest way to get the Check In Comment from a SharePoint list. I using Access to get the rest of the datapoints from the built in SahrePoint functionality in Access 2007. Check in Comment is not here?

    Thursday, May 12, 2011 11:10 PM

Answers

  • Hi Jay,

     

    It is impossible to get the ”Check In Comment” from SharePoint list into Access linked table through out of the box. It is only displayed in  the  library.

    But you can read the contents “Check In Comment” with a console application, and put values in a new field “Test” showing in the view, this column can be edit and linked in the Access 2007 .
    NOTE : The data in “Check In Comment” will be NULL after you updated the item, please consider this point effect seriously.

    There is the code sample, and you can make it as a reference.

    namespace spconsole

    {

        class Program

        {

            static void Main(string[] args)

            {

                SPSite siteCollection = new SPSite("http://<server>/<sitecollection>/<site>/");

                SPWeb site = siteCollection.OpenWeb();

                using (siteCollection) {

                    using (site) {

                        SPList list = site.Lists["Mydoclibrary"];

                        foreach (SPListItem item in list.Items) {

                            item["Test"] = item["Check In Comment"].ToString();

                            item.Update();

                            Console.WriteLine(item["Test"].ToString());

                        }

                    }

                }

                Console.Read();

            }

        }

    }

    And you can search on the internet, whether there are third party solutions/tools.

    Thanks.
    Daniel


    • Marked as answer by Wayne Fan Friday, May 20, 2011 10:46 AM
    Monday, May 16, 2011 10:09 AM
    Moderator