Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 script component error sql dts pipe line c

Author  Topic 

sarahmfr
Posting Yak Master

214 Posts

Posted - 2011-09-15 : 22:42:03
Hello,
I have a dataflow source is an xml file destination is a table in database
one of the columns in the xml file is a clear text password
I added a script component as a transformation between the xml source and ole db destination to encrypt the password

here is my script what i am doing wrong
I go an error message that sql dts pipe line can not create component exception
public override void RawData_ProcessInputRow(RawData_Buffer Row)
{
/*
Add your code here
*/

ProcessedDataBuffer.AddRow();
ProcessedDataBuffer.luminusid = Row.luminusid;
ProcessedDataBuffer.firstname = Row.firstname;
ProcessedDataBuffer.lastname = Row.lastname;
ProcessedDataBuffer.email = Row.emai;
ProcessedDataBuffer.accessrole = Row.accessrole;
ProcessedDataBuffer.organizations = Row.organizations;
ProcessedDataBuffer.orguserid = Row.orguserid;


//encrypt passsword

byte[] data = System.Text.UnicodeEncoding.GetBytes(Row.pass);
SHA256 shaM = new SHA256Managed();
byte[] result=shaM.ComputeHash(data);
ProcessedDataBuffer.encrpass = Convert.ToBase64String(result);





}
the data type of the pass in source is Unicode string [DT_WSTR] size 20 and in output it is Unicode string [DT_WSTR] size 64
Thanks

sarah
   

- Advertisement -