Home > Articles > Data > SQL Server

Enhanced Connectivity from SQL to SharePoint to Office

  • Print
  • + Share This
Flexible dynamic data access is an impressive improvement to SharePoint 2010 that provides both read and write capabilities back to an external data source, like SQL, so that you can adjust data between Office, SharePoint and SQL. In this article we will show you how!
Like this article? We recommend

One of the key focus points for SharePoint 2010 was to increase "Insight" with regard to Business Intelligence (BI). Along those lines, PerformancePoint (which was a separate set of services as a 2007 Office Server) was integrated with SharePoint 2010. In addition, Excel Web Services and Visio Web Services have been enhanced.

There was an added push to make more than a read connection to SQL, which is all that was available with SharePoint 2007. SharePoint 2010 allows read and write ability to a SQL database. Even better, you can take that same concept and make a change through an Office 2010 app that connects to your SharePoint data that is pulling from a SQL database ... and it will write that data to the SQL database! This is an impressive and essential set of dynamic data access that we’ve been hoping for.

Originally called the Business Data Catalog, Business Connectivity Services (BCS) allows you to link your data columns in SharePoint to real business data in SQL; and the link is bidirectional so that you can read and write to the data.

In addition, you can connect this to other applications like Visio Services so that adjustments will update the SQL and the Visio diagram that demonstrates a live working copy of inventory can be updated at the same time thanks to the integration capabilities.

Obviously, this kind of solution can become quite complicated from a development perspective. However, it was designed to be easy to use on the lower levels. For example, imagine that you have a Customer database with information established in various tables about your customers. Through the latest version of SharePoint Designer 2010, you can scan the Navigation pane (note: folder views are gone) to select External Content Types, which will take you to the External Content Types ribbon interface. Click External Content Type under the New grouping. This will make it possible for you to connect to and interact with data from back-end systems.

When creating the new external content type you will be asked to provide the Name, Display Name, and so on (as shown in Figure 1, which was provided by Microsoft). There will be a link to External System where is says "Click here to discover external data sources" and you can use it to add your connection to SQL, .NET Type, or WCF Services. If you select SQL (if that is what you are using) you can provide the server connection information (Database Server, Database Name, Name) and then the connection information if you are connecting with the user's identity, impersonated Windows identity, or impersonated custom identity.

This should give a navigation view of your databases so that you can select the one you need for your list. Right-click that table and choose Create All Options. Finish up the wizard and the connection is made.

Next up, you need to create an external list from the ribbon within your SharePoint site by selecting Create Lists & Form from the List & Forms grouping. The external list will require you to provide only the name you wish to use, the Read Item Operation, the System Instance, and the List Description. At this point, you have a connection to external content so that you can read and write from SharePoint to SQL.

To take it one step further, you go back to SharePoint Designer to create an Office Item Type. The link is located just above the External System link we described a moment ago. From here you can choose something simple like a Contact. This will allow Outlook Contacts to integrate with the external content type. Now, you may have fields in your data that do not exactly match up with the fields that Outlook has defined for the same data. The connection cannot guess what you mean so you will be given the opportunity to match up the fields. So, you may have LastName and the field is Last Name; you just need to ensure that they are mapped and then save the changes.

Now, when you open that list in SharePoint, there will be a link that says Connect to Outlook. This will allow your Outlook to now see the list that is connected through SharePoint in SQL! (A little Outlook add-in will be installed at that time specifically to allow you to see that data). You will see it in Contacts, which is only partially awesome. The better part is that you will be able to make changes in Outlook to those Contacts and those changes will be made in SQL (and reflected in SharePoint as well).

There is obviously a lot more to this feature and the implementation possibilities that go along with it. This was just one example to show you how easy it is to get started with and to hopefully help you to appreciate the flexible power that SharePoint now has with BCS and Office 2010.

  • + Share This
  • 🔖 Save To Your Account