Business connectivity services - External list in SharePoint 2010

Create External list in SharePoint 2010 :

       In SharePoint you can create a external list(connect with SQL Server Db & table)Here i will explain how to do that.Before that you need to have or create one database and one table(which we need to connect as external list).If you already have the do the following steps,otherwise create one Database and one table and do the following.

Steps to Create External List :

1.Open SharePoint designer & give your site url click open.

2.Click External Content Types(which was in left side) -> click External content Type(Placed in Top Ribbon)


3.Give name for External content Type and click->Click here to discover data source and define operations
shown in below

4.Click Add New Connection->select SQL Server click OK
5.Give  SQL Server name and Your Data Base name then click OK
6.If you are facing any error(like Below image) while clicking OK, You need to add users permissions for your database in your SQL server For that
Open SQL Server->Security->Logins->Right Click on users whoever you want to add permissions->
Properties->User Mapping->Find your Db name and Click the Checkbox of your Database name->
Below Click check box of db_owner click OK
(Like this you need to add every user you want to access)
7.Now click OK,& that error will not come.Your Database will be added here.
Now expand Db name and tables ->Right click on your Table Name->
Create All Operations->Next->Here your need to set on primary key(Which should be unique)->
click Finish

8.Save this work(Which was placed in Top Left Corner of designer)
That's all you have almost done!

9.create a External list from SharePoint site or Designer.
In designer click Lists And Libraries->click External list on top Ribbon->
Select your Db name->click OK->give list Name click OK
.

10.Open your site and there you can see your external list.And If you edit this list here 
it will automatically updated in SQL server also.

Comments

Popular posts from this blog

Upload Single/Multiple file by using the REST API and jQuery SharePoint 2013

Add content type to SharePoint List/Library using REST API

A type named 'SP.Data. could not be resolved by the model error