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.
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 databaseone of the columns in the xml file is a clear text passwordI added a script component as a transformation between the xml source and ole db destination to encrypt the passwordhere is my script what i am doing wrongI 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 64Thankssarah |
|
|
|
|