Hot answers tagged

5

This is completely unsupported! Do not read or write data to SharePoint databases. You need to go through the SharePoint Object Model, namely using SPWeb.EnsureUser which will add the entry if it does not exist.


2

I would also like to add that you can also accomplish this with SQL Table Views. So if you create a custom view within your SQL DB, you can connect to it in BCS using SP Designer as if it was a regular table. My understanding is that if the View is update-able as defined here, you will also be able to add Update controls to it. To add a view as an ECT ...


2

SharePoint API has class and function SPContentTypeUsage.GetUsages that returns all content type usages in site collection. Is MSDN article there is an C# sample too. Also look at the accepted answer in this question . The answer is in PowerShell.


2

You can use the script to give specific users the db_owner role. Don't forget to dd all users to users.txt. [System.Reflection.Assembly]::LoadWithPartialName(‘Microsoft.SqlServer.Smo’) | out-null $Users = get-content c:\users.txt Foreach ($User in $Users){ $InstanceName = "" $NewOwnerLoginName = $user; $smosvr = New-Object ...


1

You can use the stored procedures with BCS, so instead of a single table, you can gather information (Read only) from a result of a query. You need to create the stored procedure in SQL first, then connect to BCS through SHarePoint Designer, then you will be able to create a External Content Type based on that stored procedure. Here is an article that ...



Only top voted, non community-wiki answers of a minimum length are eligible