天天看點

SharePoint 2010之資料同步External Content Type - by SharePoint Designer2010

實作SharePoint List 與SQL Server 2008 table的資料同步有2中方法,

1. 直接通過sharepoint designer 2010來實作

2. 通過VS 2010 建立BDC model來custom code來實作。

這裡描述第一中方法:

a) 連結到所要實作資料同步的站點

b) 在左側sub object窗體中點選External Content Type,可以檢視目前該站點上所有的External Content Type.

在ribbon中,new 部分中點選External Content Type

c) 點選External System後面的連結建立資料源

d) add Connection --> 選擇SQL Server作為DataSource Type --> 輸入server name& table name

e) 這個時候會在下面的view中發現你所連結到的資料源,然後展開table節點,右鍵單擊,選擇你所要建立的方法,比如: create all operations.(這個操作是為了起到list 與table 之間的關聯操作)

f) 儲存。回到External Content Type(do the second step to navigate there.)左鍵選擇新建立的ECT,然後在Ribbon中選擇External List, 在彈出對話框中輸入list name & description. 建立完畢,在該站點中就會看到這個list.

g) 當你檢視所有記錄的時候,也許會報出:Access denied by Business Data Connectivity. 是因為沒有為External Content type配置通路權限。

h) 打開central administration --> click Manage Service Applications -->click Business data connectivity service --> select your External content type --> set permission for it(add your account and other accout you want to assign) 

i) 重新整理list的視圖。搞定!

參考:

http://blogs.pointbridge.com/Blogs/monnette_jeff/Pages/Post.aspx?_ID=23

繼續閱讀