views:

118

answers:

2

I wonder if there is a supported way to access the SharePoint 2010 SQL Server through an API?

I'm not talking about modifying any SharePoint Database directly (I know that that is still unsupported), but I'd like to store some data that my application needs, and instead of asking the user to enter a Connection String, I'd prefer to create my own database on the SQL Server that SharePoint uses.

I think I could use the new Service Application stuff, but that seems a bit overkill?

A: 

From my perspective you still shouldn't mess with the SharePoint databases. By adding your own tables within the content database(s) you are still violating the supported way to do things, not the least breaking the best practices. The preferred way to store/read and manipulate data in SharePoint is by using Lists and Document Libraries.
You can also use the BDC, or BCS in SharePoint 2010.

Magnus Johansson
I'm more thinking of having my own database, but within the SQL Instance that SharePoint owns.
Michael Stum
@Michael. Well that shouldn't be any issue.
Magnus Johansson
A: 

Just to answer myself: The supported way is through a Service Application, which is only suitable for large scale things (It's a LOT of plumbing).

Theoretically one could also get an Instance of the SPDatabaseService and work with that.

Michael Stum