Using SQL adapter to store entire XML message in SQL Server

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Using SQL adapter to store entire XML message in SQL Server

Viewing 1 reply thread
  • Author
    Posts
    • #19983

      Hi,

      I have a question regarding the SQL adapter and if it’s possible to save an entire message in 1 column in a SQL table.   I’ve tried using updategrams as well as stored procedures but am unable to map the entire message into one field in my target table.   My stored procedure has 4 parameters.  I am able to map the first 3 parameters to individual fields in the source schema but I’m not sure how I can configure the entire XML message that is being sent, as the 4th parameter. 

      Thanks!

    • #19984

       You need to put the entire Xml as a string into the 4th parameter.

      There are two ways I have found of doing this.
      1. In an orchestration:

      xmlDocVariable = inputMessage;
      SQLMessage.FourthParameter = xmlDocVariable.OuterXml; (assumes FourthParameter is a distinguished field)
      or
      xpath(SQLMessage, “4th parameter xpath”) = xmlDocVariable.OuterXml;

      2. In map – requires custom code

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.