The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Programmatically add or remove item level permission in Sharepoint 2007
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

kalu singh raoPosted Jul 6, 2016, 1:52 AM
Nice...
SayanPosted Jun 16, 2014, 2:49 AM
can i use it for share point 2010 ?
SayanPosted Jun 16, 2014, 1:54 AM
WOW very usable
Merul TechPosted Jun 29, 2012, 12:02 PM
Thank you very much for a nice article. you saved my day.
Denis ZalagaevPosted Aug 8, 2011, 2:19 PM
Thanx!
ZuberPosted Sep 10, 2010, 6:27 AM
Thankx
eliza sahooPosted Jun 21, 2010, 8:43 AM
Here is a solution to this problem. public static int NextListItemID(SPSite oSite, Guid listId) { int listItemId = -1; Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(delegate() { if (oSite.WebApplication.ContentDatabases.Count > 0) { //Get the connection string for the sharepoint database string connString = oSite.WebApplication.ContentDatabases[0].DatabaseConnectionString; //Establish a connection SqlConnection con = new SqlConnection(connString); try { con.Open();