Connect to a SharePoint list via OLE DB

19 11 2008

How cool is this? Connect to SharePoint through OLDE DB connection string. You can then do things like SELECT * FROM listName; etc. Here’s how:

Read and write

Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=2;RetrieveIds=Yes; DATABASE=http://pp1webofficelivecom.officelive.com/Documents/;LIST={5999B8A0-0C2F-4D4D-9C5A-D7B146E49698};

The keyword “Database” specifies the SharePoint URL
The keyword “List” specifies the GUID value for the desired SharePoint list (list=table)
Querying without specifying any table name. Ie use “SELECT * FROM table” or “SELECT * FROM list” (same result from booth).

Read only

Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=1;RetrieveIds=Yes; DATABASE=http://pp1webofficelivecom.officelive.com/Documents/;LIST={5999B8A0-0C2F-4D4D-9C5A-D7B146E49698};


Actions

Information

2 responses

13 01 2009
Steve

Hi – how would you set this up with MS Access? I’ve tried creating a new ODBC user/system dn but no such success.

Any tips please?

23 09 2009
SharePointFrank

You can connect to virtually any external data source using connection strings, and select statements, e.g. Outlook, Excel, Access, Oracle etc.

The Business Data List Connector uses this feature to pull data from almost any sources directly into a SharePoint list. Its configured directly in the SharePoint list settings.

More info, screens and download:
http://www.layer2.de/EN/PRODUCTS/Pages/SharePoint-Business-Data-List-Connector.aspx

Leave a comment