Friday, June 20, 2008

Using Access 2007 as a conduit to SharePoint list data

I stumbled onto something today that I don’t know what to think of and thought I would kick it out to the world for comment. I was grappling with the idea of using “data” in lists that exist in a site collection. By using, I mean using in the since of reporting on it, integrating it with other data sources (SQL Server, web services, etc), etc. I knew that Access 2007 had native capability to treat SharePoint lists like a linked table. So, I thought to myself that if I can create a linked table to a SharePoint list and then I can use the Access 2007 database as a data source for applications other (ASP.Net, SSIS, SQL Server, SRS, etc) then would that work. Indeed it did! I first created two custom lists in SharePoint, each of them being in totally different web sites within the same site collection. Then I created an Access 2007 database and created linked tables to these lists. The first test was to see if I could join these lists together in an Access query. Yes. Then I thought, okay, can I create a SQL Server Integration Services (SSIS) package to work “directly” with the SharePoint data, but use the Access database as a conduit. So, I setup a connection to the Access database using the OLE DB Office 12 driver. Then I created a SQL Task to insert into the Access linked table that was linked to one of the lists. I ran the SSIS and by golly it inserted into the list just fine. I then wrote a transformation task that joined SQL Server data in a SQL database to the list data in SharePoint in order to insert data into another SQL Database. And that worked.

So, is this good or bad? I can’t see this being very scaleable, but using Access 2007 as a conduit into SharePoint data is a lot easier than working with the SharePoint API or web services and dealing with CAML. It seems to be that Microsoft should introduce a SharePoint data provider that can be used in SQL Server or .NET so that you can treat SharePoint lists just like tables without all of the headaches. What are your thoughts?

No comments: