I need help trying to figure out what caused this error. I threw some Messagebox.Show in the script but they never get to appear? I'm not that familiar with scripts, I inherited this SSIS from previous developer.
Unable to cast object of type 'System.String' to type 'Microsoft.SqlServer.Dts.Pipeline.BlobColumn'.
at ScriptMain.Input0_ProcessInputRow(Input0Buffer Row)
at UserComponent.Input0_ProcessInput(Input0Buffer Buffer)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
public override void Input0_ProcessInputRow(Input0Buffer Row)
agData += blobToString(Row.AG);
carlData += blobToString(Row.CARL);
fmnData += blobToString(Row.FMN);
entrData += blobToString(Row.ENTR);
private string blobToString(Microsoft.SqlServer.Dts.Pipeline.BlobColumn blob)
string result = "";
if (blob != null)
result = System.Text.Encoding.Unicode.GetString(blob.GetBlobData(0, Convert.ToInt32(blob.Length)));
catch (Exception ex)
MessageBox.Show("In the catch block" + ex);
result = ex.Message;
Looks like your blobTOString() function is trying to return a string from a blob. But the error message suggests that one of the arguments to the functions is already a string.
What are the datatypes of the columns AG, CARL, FMN and ENTR? If any one of them is already string, I think that that is what would cause this.
Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this
If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.
Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.