Xmlify unable to handle some errors

Jul 3, 2012 at 10:01 AM

Hi,

Xmlify 2012 seems unable to cope with an error coming out of an OLEDB destination (SQL Server). The reason that the row doesn't insertered into SQL is that a column in the incoming row (of type DT_DBTIMESTAMP) fails inserting into a SQL Server DATETIME column.

The odd thing is that prior to the row going into the SQL table in the SSIS pipleline the DBTIMESTAMP column contains the value "Error: Year, Month, and Day parameters describe an un-representable DateTime". I'm a bit surprised that this row makes it out of the Oracle source, given I have error output, but it does.

So as part of my error handling on the destination the error output gets passed to Xmlify. The above col value causes Xmlify to fall over. I'm surprised about this - I was under the impression that Xmlify just packages up all values as strings, then converts to XML. Any idea whats happening? I've put the full error below

Thanks

Jeremy

[Error to XML [64]] Error: System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.
   at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
   at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second, Int32 millisecond)
   at Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer.GetDateTime(Int32 columnIndex)
   at Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer.get_Item(Int32 columnIndex)
   at Tjoc.SqlServer.Dts.Pipeline.Xmlify.XmlifyTask.ProcessInput(Int32 inputId, PipelineBuffer buffer)
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)

Jul 5, 2012 at 3:36 PM

I've also found another example of some error data that Xmlify can't handle. This is a string that turns up as "H?v`H?vR°?¶$yh?ttr6952"

The error that I get this time is:

[Error Rows to XML [330]] Error: System.ArgumentException: '', hexadecimal value 0x05, is an invalid character.
   at System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar(Int32 ch, Char* pDst, Boolean entitize)
   at System.Xml.XmlEncodedRawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd)
   at System.Xml.XmlEncodedRawTextWriter.WriteString(String text)
   at System.Xml.XmlWellFormedWriter.WriteValue(String value)
   at Tjoc.SqlServer.Dts.Pipeline.Xmlify.XmlifyTask.ProcessInput(Int32 inputId, PipelineBuffer buffer)
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)

Am I doing something wrong, or can the component not handle these sorts of errors?

Thanks

Jeremy

Coordinator
Jul 16, 2012 at 8:51 PM

Hi Jeremy

Thanks for trying the XMLfily,  I think I can handle the the second error by adding some the text encode for XML/HTML.  However the first error I not sure how to handle.  As all I do is call the ToString() method on each column to write the XML.  By the look of the trace stack the pipline class converts the column to the .Net type before converting to a string.  The best I can do is handle the error graceful.

Regards

Steve