Cannot delete sharepoint list (insert and update works fine)

Jun 3, 2011 at 7:16 PM
Edited Jun 3, 2011 at 7:17 PM

Hi,

I have tried inserting and updating sharepoint lists using an SSIS package and they are working fine. But when I try to delete I am getting the follow error (from the sharepint log file)

Generated Instruction:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
 <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <listName>MyLibrary</listName>
  <updates>
   <Batch OnError="Continue" ListVersion="1" xmlns="">
    <Method Cmd="Delete" ID="1"><Field Name="ID">108</Field></Method>
   </Batch>
  </updates>
 </UpdateListItems>
    </s:Body>
</s:Envelope>

Error message: Invalid file name. 
The file name you specified could not be used. 
It may be the name of an existing file or directory, or you may not have permission to access the file. 
6e089aca-c529-4ede-b83a-dd9774262042

 

Thanks in advance!

 

Pedro

Coordinator
Aug 3, 2011 at 6:21 AM

Sorry - I've not seen that; Did you verify the account you're using has delete permissions, as per the error message?

Jan 31, 2012 at 5:13 PM

It looks like I'm having the same problem:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
 <s:Body>
  <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <listName>Document Library</listName>
   <updates>
    <Batch OnError="Continue" ListVersion="1" xmlns="">
     <Method Cmd="Delete" ID="1">
      <Field Name="ID">76</Field>
     </Method>
    </Batch>
   </updates>
  </UpdateListItems>
 </s:Body>
</s:Envelope>

Batchmgr Method error. Errorcode: 0x0bf0ac70. Error message: Invalid file name.  The file name you specified could not be used.  It may be the name of an existing file or directory, or you may not have permission to access the file.

The SPCRED connection is configured with a site collection administrator account on my dev machine.

I can read from the library without any problems.

Apr 17, 2012 at 5:51 PM

I have done this by creating a DatalistSource that contains the CAML of the data I want to purge. Then create a DataSource destination from the list source with "delete".

Coordinator
Apr 18, 2012 at 2:21 AM

Aizen, the only thing I can think about is perhaps since that is a document library, there is an attached file associated with that row which does not exist and causes Sharepoint to fail when trying to delete - Corruption? I have no idea why you would have files missing, but that error seems to indicate something internal in your DB is not correct.

Jun 21, 2012 at 4:29 PM
Edited Jun 28, 2012 at 4:31 PM

Hello,

EDIT : Removing files from a document library is not possible with DeleteListItems because it's not the same query. You have to use RemoveFiles which is bugged https://sqlsrvintegrationsrv.codeplex.com/workitem/18247


I have the same problem (with the same error message) when i try to delete files from a document library with the DeleteListItems method (RemoveFiles doesn't work either because it shares the same code). I have all the needed permissions.

Here is the SOAP message from SharePoint log :

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/"
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <listName>Documents</listName>
      <updates>
        <Batch OnError="Continue" ListVersion="1" xmlns="">
          <Method Cmd="Delete" ID="1">
            <Field Name="ID">3</Field>
          </Method>
          <Method Cmd="Delete" ID="2">
            <Field Name="ID">4</Field>
          </Method>
          <Method Cmd="Delete" ID="3">
            <Field Name="ID">1</Field>
          </Method>
        </Batch>
      </updates>
    </UpdateListItems>
  </s:Body>
</s:Envelope>

Do you have any idea ?