SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Problem referring to a SSIS variable inside Script task


Problem referring to a SSIS variable inside Script task

Author
Message
Phil Parkin
Phil Parkin
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19502 Visits: 20462
touchmeknot123 (7/15/2009)
Hi,

I am developing the SSIS package to parse a non-delimited file.
Can you please help me on the script which is to be written to parse the file ?

Thanks


This should be set up as a new thread. When you do so, please post some sample data (showing the format of the source data and the desired output format). Wading straight into designing a script may be overkill ... but without seeing some sample data, we cannot give good advice.

Also, please explain further what you mean by 'parse'.

Phil


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
ddo0trong
ddo0trong
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 16
Hi John Rowan!

I have a similar problem. I did what you said about the Propogate variable = false on all tasks inside the foreach container. But the execution still halts, it doesn’t go to the next item iteration of the loop. Am I missing something?

=======================================================================
ForEach Loop
DataFlowTask(OnErorr Propogate=false)
==>success>
DataFlowTask(OnErorr Propogate=false)
==>success>
FileSystemTask(OnErorr Propogate=false)
==>success>
SendEmailTask(OnErorr Propogate=false)

Problem: My SMT could fail with bad email address and to me that’s ok. For example: the first item in the collection has a bad email. I have a OnError event SendeEmailTask here to handle when the task fails. It executed the OnError SendEmail task fine. Then, the SQL task was executed. Then the whole package failed. It never went to the next item in the collection. I want my package to still go on to the next item in the collection but it stops the whole package. I added the propogate to all the tasks in the foreach container like you mentioned to do, but it stops on the first item of the collection because the email is bad.

==>success>
SQL Task


=======================================================================
Jamie-2229
Jamie-2229
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3152 Visits: 838
The reason it isn't found in the collection is because it is not in the collection. Go to the data sources listed in the Solution Explorer that point to that database and delete it. Then recreate it. When you do, it will ask you to put that data source in as a new collection item (unless it is already there and you wouldn't get that message if it was).

Jamie
roohisachdeva2009
roohisachdeva2009
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 29
I have got dialogue box added to SSIS package,through script at the end,that populates when process is completed.

But it throws the below error when called from SSMS job “Script Task: Error: Exception has been thrown by the target of an invocation”

Script has just below code is in C#

System.Windows.Forms.MessageBox.Show(“Process has completed”);

Please clarify.
cbrammer1219
cbrammer1219
Old Hand
Old Hand (355 reputation)Old Hand (355 reputation)Old Hand (355 reputation)Old Hand (355 reputation)Old Hand (355 reputation)Old Hand (355 reputation)Old Hand (355 reputation)Old Hand (355 reputation)

Group: General Forum Members
Points: 355 Visits: 424
Just wanted to comment, I had same problem and this worked like a charm....Thanks
Success.sunil5
Success.sunil5
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 2
Test
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