Saturday, October 17, 2009

Working with bulk list items

Working with bulk list items

SPWeb.ProcessBatchData Method

Processes the specified batch string of commands for sending multiple requests to the server per transaction.

using (SPWeb oWebsite = SPContext.Current.Site.OpenWeb("Website_URL"))
{
SPList oList = oWebsite.Lists["Announcements"];
System.Guid guid = oList.ID;
string strGuid = guid.ToString();

string strPost = "" +
"" +
"" + strGuid + "" +
"New" +
"Save" +
"" +
"New Manager
" +
"" +
"Congratulations to Mary for her promotion!
" +
"" +
"2003-09-14T00:00:00Z
" +
"
" +
"" +
"" + strGuid + "" +
"New" +
"Save" +
"" +
"New Technical Consultant
" +
"" +
"Welcome to the team, John!
" +
"" +
"2007-10-15T00:00:00Z
" +
"
" +
"
";

string strProcessBatch = oWebsite.ProcessBatchData(strPost);
}

1 comment:

  1. I have heard about another way of microsft outlook backup. Besides, you can visit my blogs at: http://daspeac.livejournal.com/ or http://daspeac.blogspot.com/ where I’m trying to share my experience with regard to data corruption issues

    ReplyDelete