I am trying to set a decimal value to the pipelinecolumn buffer, but it doesnt get set, and the value is NULL.
Here is the portion of the code of what I am trying to do:
if (columnInfos[x].colName.EndsWith("_CRC"))
{
int a;
a_cmp tst = new a_cmp();
a= tst.a_crc32(inputbufferstream); this function returns a integer value
buffer.SetDecimal(colInfo.bufferColumnIndex, Convert.ToDecimal(a));
}
Please let me know how to set a decimal value in the buffer.
That line of code looks correct, assuming the bufferColumnIndex is correct and the column is of type DT_CY, DT_DECIMAL, or DT_NUMERIC.
Are you seeing an exception?
Thanks
Mark
Do you want to set an integer or do you wanta decimal. Subject says one thing, text says another.
An agnostic way of doing this is to just assign direct, e.g.
buffer[colInfo.bufferColumnIndex] = a;
No comments:
Post a Comment