Converting XML Doc to Stored Procedure call in VB

webmasterbeta

New Member
I need to convert a record that is stored in an XML document to the parametersof SQL Server 7.0 stored procedure calls. At the time of parsing, I knowthe Schema of the document(so I have access to data types). The XML Docmay contain multiple one-to-one or one-to-many table relationships. So itneeds to be able to update multiple tables. For example lets say I havean XML doc like:<Customer><Name>John Smith</Name><Age>35</Age><Address><Address1>1340 102nd St.</Address1><Address2></Address2><City>Bellevue</City><State>WA</State></Address><Expenses><Item><ItemID>9876</ItemID><Cost>398.00</Cost><Type>Dinner</Type></Item><Item>....</Item></Expense></Customer>So, there is a 1-to-1 relationship between the customer table and the addresstable and a 1-to-many relationship between the customer and Expenses table.Since this XML doc an get fairly nested, I need convert to multiple SP calls.(i.e sp_UpdateCustomer, sp_UpdateCustomerExpenses). How do I parse intoparameter calls?Any help would be greatly appreciated.
 
Back
Top