Quantcast
Channel: BizTalk Server General Forum
Viewing all articles
Browse latest Browse all 872

Difference between Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException & System.Data.SqlClient.SqlException for truncated field

$
0
0


We formerly had an issue where we were mapping a field that was too large to a SQL stored proc where the parm size was smaller.  We were getting this error (as expected): 

System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.  The statement has been terminated.   

Server stack trace:      at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)    
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)    
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)    
at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)    Exception rethrown at [0]:     
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)    
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)    
at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)    
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)

We fixed the above issue, and deployed through all our environments, both SQL and BizTalk.

We have an MQ feed coming from a trading partner to our QA system.  Since it is difficult to get that partner to send us a different feed per environment, we use our QA system to push the same data to three other databases "DEV", "STAGE", and "TRAINING".  We basically just add new apps to QA with more WCF-SQL send ports. So although we have a DEV BizTalk, the error below is coming from the QA BizTalk which is pushing the data to the DEV SQL Database.  I'm not seeing the error on "STAGE" and "TRAINING" at all.

Only on the SendPort to the DEV environment (called Send_ToDEV_GenerateOrderImport_WCFSQL), we get this error:

Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The input data for the field/parameter MelFdamCkpsdMsg is larger than that allowed on the SQL Server. Maximum length allowed is 150, length found was 383.

Server stack trace:
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)

I have checked the DEV database and the columns (and stored-proc parms) seem to be expanded to 4000, although I could be missing something.

The question is what is the difference in the two errors above. The second one is actually more useful, because it gives the column name, the actual length, and the max length, which is something I typically don't see in a SQL exception.


Viewing all articles
Browse latest Browse all 872

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>