I am having difficulty with a custom transform that I am developing. Specifically, I believe that either I am missing something, or the documentation is not current. I am writing a custom synchronous transform that looks up additional values from a web service, and inserts the additional columns into the current row.
The problem that I am specifically having is that even though the samples in BOL show that there is an output.Buffer value for the output columns on a synchronous output, I recieve the following error:
////////////////////////////////////////////////////////////////////////////
// Cannot get a buffer type on a sync output
//
// MessageId: DTS_E_NOBUFFERTYPEONSYNCOUTPUT
//
// MessageText:
//
// The %1!s! is a synchronous output and the buffer type cannot be retrieved for a synchronous output.
//
#define DTS_E_NOBUFFERTYPEONSYNCOUTPUT ((HRESULT)0xC020402DL)
The problem is that I don't know how else to get my output columns into an array so that I can do a
to find the actual index of the output columns.
BufferManager.FindColumnByLineageID(int BufferType, int LineageID)
I can't even get the code pasted directly in from BOL to work. Here is the link to the second in BOL: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/dtsref9/html/b694d21f-9919-402d-9192-666c6449b0b7.htm
Here is the code from BOL, the line that doesn't work is the very last one. Please note that you can access the input.Buffer here, just not the output.Buffer. However, the input does not contain my output columns, so it is not a shared buffer from what I can tell. Here is the code:
int []inputColumns; publicoverridevoid PreExecute() inputColumns = newint[input.InputColumnCollection.Count]; for(int col=0; col < input.InputColumnCollection.Count; col++) for(int col=0; col < output.OutputColumnCollection.Count; col++) } |
Any ideas are greatly appreciated. Thanks,
Josh