Thursday, April 28, 2011

External list using BCS in SharePoint 2010


Sample Database:

Create a sample Employee database in SQL Server, as shown below:



I have created BCSDB database and a sample Employee table with three columns.

Create an External content Type

Open SharePoint designer and select External Content Type:


Create new External content type as follows:


Provide all required data with content type name and click on External System link to create connection to attach content type with external data source i.e. SQL Server database.

Click on Add Connection button:


Select "SQL Server" as Data Source Type


Enter the details about your connection to your SQL Server: 


When the connection is made, your Data Source Explorer will be filled with the database you have specified. Now choose the table you want to work with and right-click and select "Create All Operations":


Click "
Next" to get to the Parameters page and then click on finish button.

Check External Content Type Operations table:


Final view of my External Content Type: EmplyeeCT 


Create an External list as Employee Details:


Provide External Content Type; click the browse-button beside it: 


Select your created External content Type and press OK.


That’s it, Your External list is created and now add/update/delete items from Employee Details list and these changes will be reflected in list as well as in Database. User will be unaware of the backend processing.




No comments:

Post a Comment