Let me start out by saying that i am XML stupid!
I'm not even sure I'm asking this correctly but here it goes....
I have a Stored procedure that will look similar to the following:
I have VB.net 2005 code that passes the XML parameter to the Sproc
using the "ds.getXML"
The problem that I am having, is the XML layout that is produced by the vb.net does not match the XML layout that The SPROC expects
VB XML
SQL XML
Is there an easy way to convert the vb.net to the what the SQL is Expecting?
I'm not even sure I'm asking this correctly but here it goes....
I have a Stored procedure that will look similar to the following:
VB.NET:
Declare @RegionList varchar(1000)
DECLARE @DocHandle int
EXEC sp_xml_preparedocument @DocHandle OUTPUT, @RegionList
select * from county
join m_CountyRegion on county.CountyID = m_CountyRegion.CountyID
JOIN OPENXML (@DocHandle, '/NewDataSet/Region',1) WITH (RegionID int) AS x
ON m_CountyRegion.RegionID = x.RegionID
EXEC sp_xml_removedocument @DocHandle
I have VB.net 2005 code that passes the XML parameter to the Sproc
using the "ds.getXML"
VB.NET:
Dim xmloperator As String = ds.GetXml.ToString 'this is passed to the SPROC
The problem that I am having, is the XML layout that is produced by the vb.net does not match the XML layout that The SPROC expects
VB XML
VB.NET:
<NewDataSet>
<Region>
<RegionID>9</RegionID>
</Region>
<Region>
<RegionID>10</RegionID>
</Region>
</NewDataSet>
SQL XML
VB.NET:
<ROOT>
<Reg RegionID = "9"/>
<Reg RegionID = "10"/>
</ROOT>
Is there an easy way to convert the vb.net to the what the SQL is Expecting?