Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Biztalk 2006 – Problem with Inserting a Date attribute into SQL table › Re: Biztalk 2006 – Problem with Inserting a Date attribute into SQL table
Rob,
My guess it has something to do with this:
A Receive error message "Syntax error converting datetime from character string" occurs while sending updategrams to the SQL send adapter.
This problem can occur if The SQL table contains a datetime column and the updategram is trying to update that column with an incorrect value.
To resolve this issue, do not use the BizTalk Mapper functoids to create the datetime values to map to the updategram. The functoids create a datetime value in the format "1999-05-31T13:20:00.000-05:00". SQL datetime columns require datetime values to be of the format "1999-05-31T13:20:00.000". Instead of using the default date and time functoid, create the datetime value manually by calling the Parse or ParseExact method of the DateTime class.
You may have to play with the System.Xml.XmlConvert class to handle cases where the day and month are getting confused.
Doug