Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.


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

↑ Back to the top


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.

↑ Back to the top


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:


2604327 Cumulative 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

↑ Back to the top


Status

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

↑ Back to the top


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

↑ Back to the top


Keywords: kbqfe, kbfix, kbexpertiseadvanced, kbsurveynew, kbbtsadapters, kb

↑ Back to the top

Article Info
Article ID : 2598894
Revision : 2
Created on : 9/11/2018
Published on : 9/11/2018
Exists online : False
Views : 344