Lookup Transformation output datatype.
I am outputting some Chinese text through a Lookup Transformation. The Lookup data type for the column sets itself to DT_NTEXT. I need to change this to DT_WSTR. However the lookup advanced editor will not let me do this. If I can't change the output data type then the text will not appear as Chinese. Can anybody help?Mr Shaw
August 30th, 2012 7:35am

You can convert it after the lookup with a Data Conversion component.MCTS, MCITP - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2012 7:39am

Hi, I placed a conversion to DT_WSTR after the lookup and I am still getting the same results. Mr Shaw
August 30th, 2012 9:05am

Hi, I placed a conversion to DT_WSTR after the lookup and I am still getting the same results. Mr Shaw Do you get an error? You could try to do the conversion in a script component. For example: public override void Input0_ProcessInputRow(Input0Buffer Row) { int BlobLength = Convert.ToInt32(Row.myBlobField.Length); byte[] byteBlob = new byte[BlobLength - 1]; byteBlob = Row.myBlobField.GetBlobData(0, BlobLength); string stringBlob = Encoding.Unicode.GetString(byteBlob); System.Windows.Forms.MessageBox.Show(stringBlob); // add code here to output the string } MCTS, MCITP - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2012 9:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics