Error while editing Dataflow Script component

  • Hi all,

    if i try to edit the source code of any script componente in any dataflow the following error is displayed after pressing the "design script" button.

    ===================================

    Cannot show Visual Studio for Applications editor. (Microsoft Visual Studio)

    ------------------------------

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.762&EvtSrc=Microsoft.DataTransformationServices.DataFlowUI.SR&EvtID=CouldNotShowVsaIDE&LinkId=20476

    ===================================

    Specified cast is not valid. (Microsoft.VisualBasic.Vsa.DT)

    ------------------------------

    Program Location:

    at Microsoft.VisualBasic.Vsa.Dt.VsaIDE.ShowIDE(Boolean showOrHide)

    at Microsoft.SqlServer.VSAHosting.DesignTime.ShowIDE(Boolean showOrHide)

    at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ShowIDE()

    at Microsoft.DataTransformationServices.DataFlowUI.ScriptUI.propPage_DesignScript(Object sender, EventArgs args)

    The provided link doesn't point to any helpful information.

    The package was initially build under SSIS Mangement Studio of an SQL Server 2005 SP1. Actually the SQL server was upgradet to SP3. Before the upgrad i was able to edit all script components in the package without problems.

    So my question is how to solve the problem. Does any body have an idea?

    Thanks a lot in advance....

  • First you'll have to figure out what piece of code generates the error. Maybe it uses some depricated functions?

    Then, you can edit the code in the XML file in the package to resolve the issue.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Hi da- zero,

    there is no code involved that i created manually. The message is shown from the edit dialog of an script component when i press the button "design script" in the script section.

    The dialog is provided by visual studio, so i'm not sure which code i should examine to get the information you mentioned.

    Kind regards...

  • I assume there is some Visual Basic code inside the Script Component? You know, the code that you want to edit?

    Or does the error happen when you drag a new Script Component to the work pane and you want to write some new code?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • I have had something similar happen when after i did a SP upgrade I couldn't find an easy answer, I ended up deleting the component that caused the issue and then re-creating it and it worked fine.

    Since you don't have any custom code it shoudn't be too difficult to rebuild it, I saved a copy of the package xml first so i knew what the input/outputs were.

  • @da- zero:

    Why should plain text cause a problem while opening VSA? Further more i was able to edit the source code of any script component some time ago.

    @steveb-2:

    Autsch... the package i'm talking about realises a database synchronisation between the sql server and a mysql database with quite a lot of tables. So there is not only on script component to edit...

    Considering your reply I'll try to create a new script component to test if this could be a possible solution.

    Here a little update:

    I tried to create a new script component. Unfortunatly the same error message was displayed after clicking on "design script". So this is not the solution. :ermm:

  • gfey (4/9/2010)


    @da- zero:

    Why should plain text cause a problem while opening VSA? Further more i was able to edit the source code of any script component some time ago.

    So, if I've read your question at the beginning of this topic correctly:

    * Specified cast is not valid. (Microsoft.VisualBasic.Vsa.DT) This happens when you try to design the script, meaning, when Visual Studio tries to interprete the code. It's not just plain text anymore then. (especially since this gives a cast error). The idea of editing the plain text in the XML is to adapt the code so that the cast error goes away.

    * if i try to edit the source code of any script componente in any dataflow the following error is displayed after pressing the "design script" button.. So, first you could edit the code and you can't anymore. This is probably caused by the upgrade, which changes somehow the way Visual Studio treats your code.

    Conclusion, you have two options:

    1. Find the code that generates the error and fix it. (like I originally said)

    2. Remove all the script components and write new ones. (like steveb. said)

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • @da- zero:

    Meanwhile i tried to create a new script component and got the same error. So it is definitely no problem with the source code contained in the script component.

  • Does it happen with all the new script components that you add?

    Can you write some code, or does the error happen right away? Meaning, you are not able to write even one single line of code because you can't even open the designer?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Another thing that i have tried is to start a new solution and import the package that is casuing problems into the solution, i have saved a few corupted packages by doing this

  • @da- zero:

    There is no chance to write even one line of code because the VSA doesn't open even wehen i try to create a new script component. And yes the error occurs on every script component i tried to open so far.

    @steveb-2:

    Regarding your post, i tried to create a new package. unfortunatly the error persists.

    I think the upgrade crashed something in the installation. Do you think a reinstall of VS might help? All the post in the other forums tell that this did not solve the problem.

  • Well then, we can conclude that the upgrade to sp3 messed everything up 🙂

    Can you try the solutions given in the following URLs?

    link1[/url]

    and

    link2[/url]

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • When I had the issue, I went through all the suggestions of moving and removing files I even ended up changing some registry settings, but by the end of it I gave up and removed all the SQL server components including BIDS and also removed my version of Visual studio and then re-installed everything and it worked fine, though no guarantee that this will work for you.

  • @steveb-2:

    Hmmm... I think i will end up in a similar procedure since i found no thread matching my actual problem exactly.

    @all

    Thanks for your efford.

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply