Can you verify your TableMappings right before the Fill?
Also is this .NET 1.1 or 2.0?
--
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
----------------------------------------------------------------------------
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I am writing an application where the select command returns multiple
> record sets and write the infomation to a xml file. I used typed
> dataset to store the returned info and use the dataset.writexml command
> to save the data to a xml file. Oh one more thing I am used the DAB
> (data application block) to fill the dataset. I tried the same solution
> with the "Northwind" database but no luck.
>
> Here's my code:
>
> SQL stroed proc:
>
> CREATE PROCEDURE [dbo].[proc_name]
> @EmployeeID INT
> AS
>
> SELECT * FROM Employees
> WHERE EmployeeID = @EmployeeID;
>
> SELECT * FROM EmployeeTerritories;
>
> SELECT * FROM Territories;
>
> GO
>
> Here's the code that fills the dataset:
>
> TestDto dto = new TestDto(); //xsd contains the tables def
> string[] tableList = new string[3] ;
> tableList[0] = "Employees";
> tableList[1] = "EmployeeTerritories";
> tableList[2] = "Territories";
>
> SqlHelper.FillDataset("connectionstring", CommandType.StoredProcedure,
> "proc_name", dto, tableList, new SqlParameter("@EmployeeID", 1) );
>
> dto.WriteXml(@"C:\xxx.xml");
>
> When I look at the "xxx.xml" file i see the table mapping being done
> for "Employees" and "EmployeeTerritories" but "Territories" mapping is
> set to "Table2"...Crazy!!!!
>
> Can someone please tell me why?
>