Go to Application Management -> Manage Service Applications as shown below.
Click on New ->Business Data Connectivity Service
Enter Service Application Name and Click OK.
Business Data Connectivity Service application is created as shown below,
Create New -> Secure Store Service application as shown below,
Enter the name “Secure Store Service” and Click Ok.
Secure Store service is created as shown below.
Business Connectivity service and Secure store service are the prerequisites for Creating BCS in SharePoint.
Open site in SharePoint Designer as shown below.
Open Sql Server and Create a Database StudentDB.
Create a Table EmployeeDB with below Script,
|CREATE TABLE [dbo].[EmployeeDB](
[EmployeeID] [int] IDENTITY(1,1) NOT NULL,
[EmployeedName] [text] NULL,
[EmployeedSalary] [float] NULL,
CONSTRAINT [PK_EmployeeDB] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Table Design looks as below,
Go to External Content types option in SPD as shown below,
Click on External Content Type button in Top menu. The designer looks as below,
Click on the option “Click here to discover external data sources and define operations” under External Content Type Operations.
The designer looks as below,
Click on Add Connection.
Right Click on the Table and Select Create all operations as shown below.
Click on Next.
Click on Finish.
Save the Content Type in the Name EmployeeDB as shown below.
Open the SharePoint Site http://htc:7004/ in Browser.
Click on Site Action -> Site Content.
Click on Create.
Click on External List.
Select the Content type from the list.
Give name as Employee Table and Click on Create.
The Output as below,
External List is created as shown below.
Now the External List allow CRUD Operation.