vs2005, ssis script
Hello i am writting a script in a ssis package and i am unable to get the newline "Microsoft.VisualBasic.ControlChars.NewLine"command to work. If there is a better way to do this let me know.
Dts.Variables("Message").Value = Dts.Variables("Message").Value.ToString &"Populate ADIM_LoeAssociateInformation Successful with " & Dts.Variables("Q").Value.ToString &" Records" & Microsoft.VisualBasic.ControlChars.NewLine
Thanks
Microsoft.VisualBasic.Constants.vbCrLf is waht you need.
I tried that as well and this way too. The last & vbCrlf does not wokr either way.
Dts.Variables("Message").Value = Dts.Variables("Message").Value.ToString() &"Populate ADIM_LoeAssociateInformation Successful with " & Dts.Variables("Q").Value.ToString &" Records" & vbCrLf
Although I ran a test like this and it did work. Is there something the matter with the above statement?
Dts.Variables("Message").Value ="Line 1" & vbCrLf &"Line 2"
Line1
Line2
Ok - Inserted the new line command twice and the output created 2 lines.("& vbCrLf & vbCrLf") When I enter the command once it is ignored.
Any ideas as to why this is happening?
Dts.Variables("TableLoads").Value = Dts.Variables("TableLoads").Value.ToString() &"Populate ADIM_LoeAssociateInformation Successful with " & Dts.Variables("Q").Value.ToString &" Records" & vbCrLf & vbCrLf
how are you displaying this that you think it's not there?
The display tool is probably the issue... you may need to customize for whatever is consuming the data.
I am using a variable to keep track of several steps throughout the ssis package. I populate the variable with information related to each step via script. I then send the complete variable via send mail task.
using only one command the eamil looks like this:
The following tables were populated with data:
Populate ADIM_LoeAssociateInformation Successful with 0 Records Populate W_AssociateList Successful with Records Populate W_FinancialOrgHierarchy Successful with 0 Records Populate W_BankingCenters Failed Populate W_BankingCenters Successful with 0 Records Populate QM_StandardL1Answers Successful with 0 Records Populate QM_Results Successful with 0 Records
Using 2 command next to each other the output looks like:
The following tables were populated with data:Populate ADIM_LoeAssociateInformation Successful with 0 Records
Populate W_AssociateList Successful with 0 Records
Populate W_FinancialOrgHierarchy Successful with 0 Records
Populate W_BankingCenters Successful with 0 Records
Populate W_BankingCenters Failed
Populate QM_StandardL1Answers Successful with 0 Records
Populate QM_Results Successful with 0 Records
Thanks for your help!
0 comments:
Post a Comment