Synchronizing SQL Server and SharePoint list data through the CLR (iv)

Source: Internet
Author: User
Tags microsoft sql server

This series of articles is based on the following software environments:

Windows Server 2003 Enterprise Edition Service Pack 2

Microsoft Visual Studio Team System 2008

Microsoft SQL Server 2008

Microsoft Office Sharepoint Server 2007

Background

First, why do you want to synchronize SQL Server and SharePoint list data, which is an actual project application.

The customer's SharePoint site has four lists that form a hierarchy of organization data that ultimately comes from a table in a database that is used by another system. In the early stages of the project, developers manually export data from the database and then import it into a list that has already been created in the SharePoint site; later in the project, data in the source database changes, so developers need to manually check for changes in the data and synchronize to SharePoint List. Because of the large amount of data, this work is labor-intensive and energy-intensive, so we plan to write a stored procedure in SQL Server and add it to the scheduled task of SQL Server, so that SQL Server synchronizes the data automatically in a cycle. Because of the access to SharePoint sites and lists and the control of permissions, we thought of using CLR methods in SQL Server to write stored procedures and deploy them. The following is a screenshot of the structure and data sources of these four lists.

Area List

Two text-type fields, title and Area_code,title are the names of area, and Area_code is the region code for areas.

Region List

Title:text type, the name of the region.

Area:loopup type, pointing to the ID of the area.

Region_code:text type, Region encoding.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.