.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Post New Resource Bookmark and Share   

Accessing LOB Data Using Business Connectivity Services in SharePoint 2010

Posted By:Sunil Yadav       Posted Date: September 13, 2010    Points: 25    Category:    URL: http://www.dotnetspark.com  

In this article I am going to show the basic steps to create Business Connectivity Services to access LOB Data in SharePoint 2010.

Business Connectivity Services

Business Connectivity Services is new feature enhancement in SharePoint 2010. BCS connects the SharePoint 2010 to external data sources such as Sql Server, SAP, and Seibel etc. BCS replaces the BDC (Business Data Connectivity) introduced in SharePoint 2007. The BCS exposes LOB as content type and list, so user can create External Content Type and External List to connect to LOB data using OOB feature. It also allows the Read/Write operation on LOB data which is an improvement over BDC.

For more info http://msdn.microsoft.com/en-us/library/ee534979%28office.14%29.aspx

Following are the steps to create new External Content Type.

Step 1: Open SharePoint Designer from All Programs as shown below.

Step 2: Open site in the SharePoint Designer.

Step 3: Create External Content Type.

Provide details name, namespace, office item type, offline sync for external list. The default content is shown below. Connect to external system by clicking the below highlighted link.

Step 4: Click on Add Connection and select SQL Server as data source type.

Clicking on Add Connection lists three data source types (.Net Type, Sql Server and WCF Service). For this demo we will select Sql Server as external data sources.

Step 5: Enter database server and database name to be connected.

On successfully connecting with the database, you will see a database in data source explorer. Now we need to create operations on the selected table. Following operations can be performed the selected table.
1.  Read Item
2.  Read List
3.  Create
4.  Update
5.  Delete

 To create operations right click on the customer table and Select "Create All Operations" to create all the operations listed above.

Follow the wizard for configuring parameters and filters. Once done with successful configuration, save the newly created content type.

Now we are done with creating an external content type operations and fields as shown in the below figure.

Step 6: Go to SharePoint Central Administration and select "Manage service applications".

Select "Business Data Connectivity" from the list of services.

The external content type we created using SharePoint designer is reflected in the BCS. Refer to the figure below.

To allow users to use external content type, we need to set permission on external content type. To set permission right click on the Customer and select "set permission" and add the user account who will be accessing Customer entity.


Create new External List from installed item template by selecting external data source from external content type picker as shown in the below figure..

The below image shows Customer list with data filled from external content type.

As can write data back to the LOB, let's look at its write capability.

In the below figure customer "Orlando" belongs to company "A Bike Store".

Here we will update Orlando's company information in in the external list created earlier.

Update CompanyName to "Microsoft" as shown below.

The updated record reflected in the SharePoint list and in Sql Server database shown below.

Happy SharePointing!!!!!!!!!


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend