I have done quite a bit of research on this and nothing has helped so far. I have a multi-tab Excel file I need to load into a sql staging table. I created a new project/package in SSIS to loop through the tabs and build into my table via a Foreach Loop Container. When I run the package in SSIS, it works perfectly. But when I run it through a sql job, it fails with this error. If it matters, I run a script to rename the file to a standard name as it has a timestamp in the filename and I was having issues with wildcards. My thought was a permissions issue but the file has Read for everyone. We have just installed 34bit version of ado.net on our server (64bit version gave issues).

I apologize in advance if I'm not giving enough info, but not positive what all might be needed.

I greatly appreciate your time. Chris

  • Hi Chris this is ringing a bell with me as I think I hit the same issue, I will hunt down my notes but in the mean time does this link help at all? Mentions the issue when using a local variable, if not let me know and I will continue to hunt through my folders of many things sqlservercentral.com/forums/topic/…
    – Stockburn
    Jul 25, 2022 at 7:00
  • That link is one of the ones I went over. I added 'XM' in the ConnectionString of the ConnectionManager, but same error.
    – Chirs P
    Jul 25, 2022 at 19:30
  • Thought it might be mate, will keep hunting through my notes
    – Stockburn
    Jul 26, 2022 at 2:07
  • Does anyone know how to address this issue? Thanks Chris
    – Chirs P
    Aug 3, 2022 at 14:12
  • Error 0x80131509 is COR_E_INVALIDOPERATION which is An operation is not legal in the current state.
    – Hannah Vernon
    Aug 4, 2022 at 19:16


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.