0

I have a dataset and when I write it to an XML file I am getting this:

<?xml version="1.0" encoding="utf-8" ?>    
- <string xmlns="http://tempuri.org/">   
- <DATASET>  
  <DATAROW ConfigItemName="xx" EnvironmentName="xx" AssetOnlyInd="x" AssetTagDesc="xx" SerialNum="xx" />    
  <DATAROW ConfigItemName="xx" EnvironmentName="xx" AssetOnlyInd="x" AssetTagDesc="xx" SerialNum="xx" />    
  <DATAROW ConfigItemName="xx" EnvironmentName="xx" AssetOnlyInd="x" AssetTagDesc="xx" SerialNum="xx" />    
  <DATAROW ConfigItemName="xx" EnvironmentName="xx" AssetOnlyInd="x" AssetTagDesc="xx" SerialNum="xx" />    
  <DATAROW ConfigItemName="xx" EnvironmentName="xx" AssetOnlyInd="x" AssetTagDesc="xx" SerialNum="xx" />    
  </DATASET>  
  </string>

When I try and access my dataset I am not managing..

Console.WriteLine(DatasetTest.Tables[0].Rows[0][0]);

is giving me the result: 0.

Is my dataset not set up well? I've never worked with XML datasets so am not sure if I do in fact have the right rows and coloumns.. does that look right? How do I access the 1st coloumn of the 1st row?

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by LizR
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.