biztalk wcf-SQL adapter issues

HI Experts,

Am calling  sql sp using WCF_SQL adapter.

My problem here is when i pass null value to date time field am getting below exception.

Details:"System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

When i see the failed msg, it is automatically adding '0001-01-01T00:00:00' to the null element.

below is my sql-wcf schema generated element.

 <element minOccurs="0" maxOccurs="1" name="MealStart_DtTm" nillable="true" type="dateTime" />

How do i pass null values to SQL datetime fields?

February 18th, 2015 7:21am

In your map, either use the nil value functoid to map, or if you are using XSLT, then you can map like so:

<ns0:MyProc>
  <ns0:MyParam>
    <xsl:attribute name="xsi:nil">
      <xsl:value-of select="'true'" />
    </xsl:attribute>
  </ns0:MyParam>
</ns0:MyProc>
Free Windows Admin Tool Kit Click here and download it now
February 18th, 2015 8:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics