我的当前包由一个Excel源,一个脚本组件和一个OLE DB目的地组成。我想要完成的一切就是改变我的一个专栏。对于这个特定的列,我想要一个列的子字符串。但是,我不断收到以下错误消息:SQL Server SSIS没有当前行
There is no current row in the buffer. A row may need to be added using the AddRow method.
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
这是什么意思?为什么我需要添加行当我正在做的是转换数据?我是否错过了关于SSIS的大局?
这里是我的脚本代码:
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
OutBuffer.labortypewbs = Row.CopyofLevel2ProjectSegment.Substring(Row.CopyofLevel2ProjectSegment.Length - 2, 2);
}
感谢所有帮助!
你可以发布你写在脚本部分的代码 – praveen
@praveen我很乐意。 – CodeKingPlusPlus
您需要在将值分配给输出列之前添加该行。在语句outbuffer.labortypewbs = ......... – praveen