Updating Tables Using a Single Updategram Message in BizTalk Server 2004 and 2006
page 5 of 8
by Naveen Karamchetti
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 8602/ 196

Creating Updategram

Observe the following XML structure.

Listing 3 – Updategram XML structure

We would need to generate a schema in such a way so as to map the XML structure shown in Listing 3. Notice the attribute at-identity. This denotes that the value for the identity column which gets generated (when the Publisher row is inserted) shall be picked up by the Book; notice the attribute PublisherID in the Book element.

The value of the at-identity and the PublisherID shall be "NewID."

There are two different namespaces referred to in the above XML document, one is the "ns0" namespace and another one is the "ns1" namespace for the updategram.


Creating Schema for the "at-identity" attribute

Listing 4 – Root schema structure for the attribute 'at-identity'

 

Observe the schema in Listing 4, the target namespace for the attribute is the updategram.

Figure 1 – The completed schema structure for the updategram

This schema references the attribute schema created in Listing 4.

The schema in Figure 1 would generate the XML structure specified in Listing 3.

Mapping to the datagram

This map is used to map the incoming messages to the updategram schema. In this case the book and publisher messages are mapped to the updategram schema.

Figure 2 – Mapping messages to datagram schema


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 6 and 8 and type the answer here:

User Comments

Title: Getting invalid namespace error with above sample   
Name: Krishna Sharma
Date: 12/4/2007 6:37:55 AM
Comment:
I am getting "Invalid Schema" error in the send port while inserting data. any help..If you have sample code .plz send
Title: How to update multiple tables   
Name: Gopal
Date: 11/26/2007 10:54:19 PM
Comment:
Above information only tells how to insert into multiple tables, I am trying to update multiple tables could not succeed... I did not find any information on updating multiple tables....

Error

Error details: HRESULT="0x80004005" Description="All updategram/diffgrams nodes with siblings must have ids, either user specified ones or mapping schema based key field id"

Can some one point me in right direction...

Thanks in advance
Gopal

Product Spotlight
Product Spotlight 
Learn More
.NET Tools
asp.net shopping cart
asp.net chart control






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 7/5/2008 5:40:30 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search