Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS - create a script task programatically (the binary code for the script is not found)


SSIS - create a script task programatically (the binary code for the script is not found)

Author
Message
marcelo.negrisoli
marcelo.negrisoli
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 252
Hi,

I wrote a script task that´s build a SSIS Package dynamically with a Script Task.
When I open this dynamically created package, the Script Task shows with error and "the binary code for the script is not found" message.

But, when I open the Script Task, closes and click "Ok", the error disappears ...
Is there a way to fix this, without needs to open in BIDS ?

This is the reference to dinamically script task:
http://stackoverflow.com/questions/18611319/set-script-task-code-dynamically-in-ssis-2012

Thanks and sorry my broken english Ermm
Eirikur Eiriksson
Eirikur Eiriksson
SSCertifiable
SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)

Group: General Forum Members
Points: 6817 Visits: 17762
marcelo.negrisoli (5/7/2014)
Hi,

I wrote a script task that´s build a SSIS Package dynamically with a Script Task.
When I open this dynamically created package, the Script Task shows with error and "the binary code for the script is not found" message.

But, when I open the Script Task, closes and click "Ok", the error disappears ...
Is there a way to fix this, without needs to open in BIDS ?

This is the reference to dinamically script task:
http://stackoverflow.com/questions/18611319/set-script-task-code-dynamically-in-ssis-2012

Thanks and sorry my broken english Ermm


The ScriptingEngine.SaveProjectToStorage() wasn't successful, it writes the binary script code to the package, and the error message says that it's missing.

I did solve this by saving the package to a file/db storage and reload it before execution.
Cool
marcelo.negrisoli
marcelo.negrisoli
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 252
Eirikur Eiriksson (5/7/2014)
marcelo.negrisoli (5/7/2014)
Hi,

I wrote a script task that´s build a SSIS Package dynamically with a Script Task.
When I open this dynamically created package, the Script Task shows with error and "the binary code for the script is not found" message.

But, when I open the Script Task, closes and click "Ok", the error disappears ...
Is there a way to fix this, without needs to open in BIDS ?

This is the reference to dinamically script task:
http://stackoverflow.com/questions/18611319/set-script-task-code-dynamically-in-ssis-2012

Thanks and sorry my broken english Ermm


The ScriptingEngine.SaveProjectToStorage() wasn't successful, it writes the binary script code to the package, and the error message says that it's missing.

I did solve this by saving the package to a file/db storage and reload it before execution.
Cool


Thanks for reply !

I did this:

// 9. Persist the VSTA project + binary to the task
if (!task.ScriptingEngine.SaveProjectToStorage())
{
throw new Exception("Save failed");
}

// 10. Cleanup
task.ScriptingEngine.DisposeVstaHelper();

// 11. Save
string xml;
pkg.SaveToXML(out xml, null);

File.WriteAllText(@"c:\\test.dtsx", xml);

The "9. Persist the VSTA project + binary to the task" does not return any error
.. and I open the c:\test.dtsx in BIDS. When I try to execute, the error shows off Sad

The "saving the package to a file/db storage and reload it before execution." could be intended as "open the c:\test.dtsx in BIDS and try to execute" ?

Thanks again
Eirikur Eiriksson
Eirikur Eiriksson
SSCertifiable
SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)

Group: General Forum Members
Points: 6817 Visits: 17762
When you run it in BIDS, it is compiled before the execution, which is the step missing. I'll look into this when I can and will let you know.
Cool
marcelo.negrisoli
marcelo.negrisoli
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 252
Thank you Eirikur Eiriksson
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search