FIX: Error occurs or NULL values incorrectly inserted by the WCF-based SQL adapter in BizTalk Adapter Pack if an input message contains empty elements

Article translations Article translations
Article ID: 2598894

This article applies to the following product:
  • Microsoft BizTalk Adapter Pack 2.0
  • Microsoft BizTalk Adapter Pack 2010
  • Stand-alone WCF-based BizTalk Adapter for SQL Server
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario:
  • You create a send port that uses the Windows Communication Foundation (WCF)-based SQL adapter to call a stored procedure that inserts rows in the column of a Microsoft SQL Server table. The column of the table cannot store NULL values.

    Note The WCF-based SQL adapter is included in Microsoft BizTalk Adapter Pack 2010.
  • An input message that arrives at the send port has empty elements.

    For example, the message has the <ns0:input></ns0:input> or <ns0:input/> empty elements.

In this scenario, an error message that resembles the following is logged in the Application log:
A message sent to adapter "WCF-SQL" on send port "<send port>" with URI "mssql://<URI>" is suspended.
Error details: System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column '<column name>', table '<table name>'; column does not allow nulls. INSERT fails.
The statement has been terminated.
If the column of the table can store NULL values, NULL values are incorrectly inserted in the column of the table.

Notes
  • This issue does not occur if the send port calls a table operation instead of a stored procedure to insert rows in the column of the table.
  • The correct value for the empty element is an empty string.

RESOLUTION

Cumulative update information


BizTalk Adapter Pack 2009

The hotfix that resolves this issue is included in cumulative update package 4 for BizTalk Adapter Pack 2.0. For more information about how to obtain the cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:

2604327Cumulative update package 4 for BizTalk Adapter Pack 2.0

BizTalk Adapter Pack 2010

The hotfix that resolves this issue is included in cumulative update package 2 for BizTalk Adapter Pack 2010.

For more information about how to obtain the cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2572999 Cumulative update package 2 for BizTalk Adapter Pack 2010

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

REFERENCES

For information about service pack and cumulative update list for BizTalk Server, click the following article number to view the article in the Microsoft Knowledge Base:
2555976 Service pack and cumulative update list for BizTalk Server
For more information about BizTalk Server hotfixes, click the following article number to view the article in the Microsoft Knowledge Base:
2003907 Information on BizTalk Server hotfixes

Properties

Article ID: 2598894 - Last Review: November 1, 2011 - Revision: 3.0
Keywords: 
kbqfe kbfix kbexpertiseadvanced kbsurveynew kbbtsadapters KB2598894

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com