

This will create an order.xsd in your BizTalk project. In the BizTalk project add a generated item and select generated schema, in the generated schema dialog select Well-Formed XML, then select the order.xml file saved above. Grant the BizTalk Application User group access to the AdventureWorks database and execute privileges to the GetSalesOrdersToProcess stored procedure.Įxecute the stored procedure to create a sample XML document and save it to order.xml In Visual StudioĬreate a BizTalk Project (I am using for the solution name and AdventureWorks.Schemas for the project name) (complete SQL Stored Procedure available in download below) The stored procedure that I have created returns up to 5 Orders per call. You will need to decide when you create your stored procedure whether it will be returning a single Order or a batch of Orders, there will be not difference to the XML generated in the stored procedure just a difference in how you select the records to return. Install the BizTalk 2010 LOB Adapter SDK and the LOB Adapter Pack (in not already installed) In SQLĬreate a SQL Stored Procedure to return the desired data, using the xmlnamespaces and for xml path. Install the AdventureWorks SQL sample database from I will be using the Sample AdventureWorks database and returning and Order XML document.

STORED PROCEDURE TUTORIAL ADVENTUREWORKS DATABASE HOW TO
In this blog post I am going to show how to do this. The XML polling feature of the WCF-SQL adapter allow you to create your own XML document in SQL and return it to BizTalk via a polling statement. Typically when you poll data out of SQL it is a single table or the output of a stored procedure, this limited the type of data that could be returned, the example is that it was difficult to return the order header and all the detail lines with a single polling statement.
