本文介绍了如何从OLE DB源错误输出映射平面文件目标的输入列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在通过VB程序创建数据流任务,该程序将数据从OLEDB源下载到OLE DB目标并且映射OLE DB源的错误输出到平面文件目的地?





任何人都可以为我提供VB代码。



我的代码附在下面; -



它适用于opther组件但不能将错误输出列映射到输入到平面文件目的地。



它给出了错误数据流任务错误[平面文件目的地11 [1230]]:平面文件目的地的输入列数11.Inputs [平面文件目的地输入]不能为零。



代码失败的代码是: -



Dim errinput As Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSInput100 = ErrRowDestination.InputCollection(0)



Dim verrInput As Microsoft.SqlServer.Dts.Pipeline.Wrapper。 IDTSVirtualInput100 = e rrinput.GetVirtualInput()







For each verrColumn As Microsoft.SqlServer.Dts.Pipeline.Wrapper .IDTSVirtualInputColumn100在verrInput.VirtualInputColumnCollection中





Dim verrcol As Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSInputColumn100 = InstanceErrRedirect.SetUsageType(errinput .ID,verrInput,verrColumn.LineageID,DTSUsageType.UT_READONLY)

InstanceErrRedirect.MapInputColumn(errinput.ID,verrcol.ID,errinput.ExternalMetadataColumnCollection(verrColumn.Name).ID)

InstanceErrRedirect.Validate()



下一步

Hi,

I am creating data flow task through VB program that will download data from OLEDB Source to OLE DB Destination and Error Output of OLE DB source is mapped to Flat File destination?


Can anyone provide me the VB code for this.

My code is attached below;-

It is working fine for opther components but not able to map columns of Error output to Input to Flat File Destination.

It gives me error"Error at Data Flow Task [Flat File Destination 11 [1230]]: The number of input columns for Flat File Destination 11.Inputs[Flat File Destination Input] cannot be zero."

Code where it is failing is :-

Dim errinput As Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSInput100 = ErrRowDestination.InputCollection(0)

Dim verrInput As Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSVirtualInput100 = errinput.GetVirtualInput()



For Each verrColumn As Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSVirtualInputColumn100 In verrInput.VirtualInputColumnCollection


Dim verrcol As Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSInputColumn100 = InstanceErrRedirect.SetUsageType(errinput.ID, verrInput, verrColumn.LineageID, DTSUsageType.UT_READONLY)
InstanceErrRedirect.MapInputColumn(errinput.ID, verrcol.ID, errinput.ExternalMetadataColumnCollection(verrColumn.Name).ID)
InstanceErrRedirect.Validate()

Next

推荐答案

这篇关于如何从OLE DB源错误输出映射平面文件目标的输入列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 23:29