Script Error on Output0buffer - emailaddresstxt - why ? - ms-sqlserver
This is a discussion on Script Error on Output0buffer - emailaddresstxt - why ? - ms-sqlserver ; I have the following script and just want to pass same data thru the script. I cant get the SSIS 'copy column" function to work and the output0buffer.emailout works fine. Why does the output0buffer.emailaddresstxt not work ? Thanks using System; ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| I cant get the SSIS 'copy column" function to work and the output0buffer.emailout works fine. Why does the output0buffer.emailaddresstxt not work ? Thanks using System; using System.Data; using Microsoft.SqlServer.Dts.Pipeline.Wrapper; using Microsoft.SqlServer.Dts.Runtime.Wrapper; using System.Text.RegularExpressions; [Microsoft.SqlServer.Dts.Pipeline.SSISScriptCompone ntEntryPointAttribute] public class ScriptMain : UserComponent { public override void PreExecute() { base.PreExecute(); } public override void PostExecute() { base.PostExecute(); } public override void Input0_ProcessInputRow(Input0Buffer Row) { string m = ValidateEmailRow(Row.EMAILADDRESSTXT.ToString()); if (m.Length > 0) { Output0Buffer.AddRow(); Output0Buffer.emailout = m; Output0Buffer.EMAILADDRESSTXT = row.EMAILADDRESSTXT; } else { Output0Buffer.AddRow(); Output0Buffer.emailout = "No emails found"; } } public string ValidateEmailRow(string email) { string emails = ""; Regex reg = new Regex(@"\b([a-zA-Z0-9._%+-]+)@([a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})\b"); Match validate = reg.Match(email); while (validate.Success) { emails += validate.Value.ToString() + ";"; validate = validate.NextMatch(); } return emails; } } |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 04:12 PM.




Linear Mode