script component error message

  • 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

  • What is your exact error message?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply