System.InvalidCastException for IDTSVariables100 in SSIS Script Task
This looks similar to some COM reference errors I used to get with VBA and VB 6. You write a VBA code using one version of Excel and then copy the spreadsheet to another machine that uses a different version of Excel. Sometimes the error shows up by indicating that some totally unrelated library was not registered. Make sure that you have the version of Excel on your machine to the one on a machine where the SSIS package is running. If not, then you may need to drop the reference to Excel and create a reference to the version of Excel on your machine unless you install the other version of Excel. The problem with dropping the reference and reference the Excel is that now you have added a new version of the code that you are debugging. And you won't be able to fix a problem in you SSIS package and copy the package back to the original machine.Russel Loski, MCT
March 11th, 2011 11:52pm

Hi, I have a problem with a SSIS Package which was already free of any errors - and also runs successfully on the productive server. Now I wanted to analyze/debug an Excel Import Issue but I am not able to execute the package on my develpment machine any more. Following error is displayed in a dialogue box which opens when the error is thrown: Das COM-Objekt des Typs "System.__ComObject" kann nicht in den Schnittstellentyp "Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables100" umgewandelt werden. Dieser Vorgang konnte nicht durchgeführt werden, da der QueryInterface-Aufruf an die COM-Komponente für die Schnittstelle mit der IID "{22992C1D-393D-48FB-9A9F-4E4C62441CCA}" aufgrund des folgenden Fehlers nicht durchgeführt werden konnte: Eine Schnittstelle, die für einen anderen Thread marshalled war, wurde von der Anwendung aufgerufen. (Ausnahme von HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)). bei Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables100.get_Item(Object Index) bei Variables.get_LogID() bei ScriptMain.PostExecute() bei Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PostExecute() And this is the error which is logged into the Output Window of Visual Studio 2008 Business Intelligence Development Studio: [Import-Statistikdaten erfassen [324]] Error: System.InvalidCastException: Das COM-Objekt des Typs "System.__ComObject" kann nicht in den Schnittstellentyp "Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables100" umgewandelt werden. Dieser Vorgang konnte nicht durchgeführt werden, da der QueryInterface-Aufruf an die COM-Komponente für die Schnittstelle mit der IID "{22992C1D-393D-48FB-9A9F-4E4C62441CCA}" aufgrund des folgenden Fehlers nicht durchgeführt werden konnte: Eine Schnittstelle, die für einen anderen Thread marshalled war, wurde von der Anwendung aufgerufen. (Ausnahme von HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)). bei Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e) bei Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PostExecute() bei Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPostExecute(IDTSManagedComponentWrapper100 wrapper) [SSIS.Pipeline] Error: Fehler in der Phase nach der Ausführung für 'Komponente 'Import-Statistikdaten erfassen' (324)'. Fehlercode: 0x80004002. My Script Task "Import-Statistikdaten erfassen" in the Data Flow has a ReadOnlyVariable called "User::LogID" (Int32) configured. I have the same Script Task in most of my packages and it works fine in the other packages - but in that one I want to debug it does not. Please help... Regards Alex
Free Windows Admin Tool Kit Click here and download it now
March 12th, 2011 12:29am

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

Other recent topics Other recent topics