SSIS cannot access a SharePoint site
I am working on a script task to delete all items in a SharePoint list. I got an error of "The web application at http://xxxxx could not be found". I got the same error when I run the same code in visual studio 2010. I solved the problem by change the project "Platform Targe" to x64 in vs 2010. However, I cannot find this propety in SSIS designer? The following is my design enviroment. Develpment station and the test server run windows 2008 and MS SQL 2008 (64 bit). SharePoint server - SharePoint 2010 (64 bit). I will appreciate any help.
December 23rd, 2010 5:20pm

Did you try the SSIS SharePoint List Adapter (with source and destination components)? With this you can read, update, delete and insert elements from Sharepoint lists: Check it on codeplex http://sqlsrvintegrationsrv.codeplex.com/releases/view/17652 Vctor M. Snchez Garca (ES) (BI) Hope this help. Please vote if you find this posting was helpful. if this is an answer to your question, please mark it. http://bifase.blogspot.com | http://twitter.com/atharky
Free Windows Admin Tool Kit Click here and download it now
December 24th, 2010 4:32am

Hi eg10013, In SQL Server Integration Services(SSIS), in design-time(means debugging in Business Intelligence Development Studio(BIDS)), we can execute the package in 64-bit runtime in this way: Right-click the project name in Solution Explorer Click "Properties" Go to "Debuging" tab, set the value for "Run64BitRuntime" to be True Addtionally, we need to use the 64-bit dtexec to run the package in 64-bit mode, when the package is deployed to a file system or a SQL Server. Thanks, Jin ChenJin Chen - MSFT
December 27th, 2010 4:32am

I am using this adapter to upload data to the sharepoint list. However, it is difficult to use this adpter to delete list items because it requires to native sharepoint list item ID to update or delete list item.
Free Windows Admin Tool Kit Click here and download it now
December 27th, 2010 9:26am

The "Run64BitRumtime" already be set to "True". Would you please provide more information on how to "use the 64-bit dtexec" to run the package in 64-bit mode". Thank you.
December 27th, 2010 9:29am

I just double checked and confirm "Run64BitRutime" is set to "True". I still got the web application not found error. This is the first time I create an SSIS package and write script code in a SSIS package. I may miss object reference in my code. Please let me know if there is any problem with the following code. Many thanks. public void Main() { // TODO: Add your code here Dts.TaskResult = (int)ScriptResults.Success; //get to sharepoint list string urlString = "http://nywork0009/"; try { using (SPSite site = new SPSite(urlString)) { using (SPWeb web = site.OpenWeb()) { web.AllowUnsafeUpdates = true; SPList list = web.Lists["KS Offices"]; SPListItemCollection items = list.Items; int itemCount = items.Count; for (int k = 0; k < itemCount; k++) { SPListItem item = items[k]; items.Delete(k); } web.AllowUnsafeUpdates = false; } } } catch(Exception ex) { MessageBox.Show(ex.Message + "\n\n" + ex.GetType().ToString() + "\n" + ex.StackTrace, "Exception"); } }
Free Windows Admin Tool Kit Click here and download it now
December 27th, 2010 9:56am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics