前台代码:html

 <%
<%
 @Pagelanguage="c#"Codebehind="CodeUse.aspx.cs"AutoEventWireup="false"Inherits="DsAndXML.CodeUse"%>
@Pagelanguage="c#"Codebehind="CodeUse.aspx.cs"AutoEventWireup="false"Inherits="DsAndXML.CodeUse"%>
 <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN">
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN">
 <HTML>
<HTML>
 <HEAD>
<HEAD>
 <title>CodeUse</title>
<title>CodeUse</title>
 <metacontent="MicrosoftVisualStudio7.0"name="GENERATOR">
<metacontent="MicrosoftVisualStudio7.0"name="GENERATOR">
 <metacontent="C#"name="CODE_LANGUAGE">
<metacontent="C#"name="CODE_LANGUAGE">
 <metacontent="JavaScript"name="vs_defaultClientScript">
<metacontent="JavaScript"name="vs_defaultClientScript">
 <metacontent="http://schemas.microsoft.com/intellisense/ie5"name="vs_targetSchema">
<metacontent="http://schemas.microsoft.com/intellisense/ie5"name="vs_targetSchema">
 </HEAD>
</HEAD>
 <bodyMS_POSITIONING="GridLayout">
<bodyMS_POSITIONING="GridLayout">
 <formid="CodeUse"method="post"runat="server">
<formid="CodeUse"method="post"runat="server">
 <FONTface="宋体">
<FONTface="宋体">
 <asp:buttonid="btnCreate"style="Z-INDEX:100;LEFT:31px;POSITION:absolute;TOP:43px"runat="server"Height="36"Width="130"Text="创建数据集和数据表"></asp:button>
<asp:buttonid="btnCreate"style="Z-INDEX:100;LEFT:31px;POSITION:absolute;TOP:43px"runat="server"Height="36"Width="130"Text="创建数据集和数据表"></asp:button>
 <asp:Buttonid="btnUpdateDs"style="Z-INDEX:117;LEFT:35px;POSITION:absolute;TOP:439px"runat="server"Height="36px"Width="131px"Text="赋值"></asp:Button>
<asp:Buttonid="btnUpdateDs"style="Z-INDEX:117;LEFT:35px;POSITION:absolute;TOP:439px"runat="server"Height="36px"Width="131px"Text="赋值"></asp:Button>
 <asp:Labelid="Label3"style="Z-INDEX:112;LEFT:352px;POSITION:absolute;TOP:395px"runat="server">列号:</asp:Label>
<asp:Labelid="Label3"style="Z-INDEX:112;LEFT:352px;POSITION:absolute;TOP:395px"runat="server">列号:</asp:Label>
 <asp:Labelid="Label2"style="Z-INDEX:111;LEFT:209px;POSITION:absolute;TOP:395px"runat="server">行号:</asp:Label>
<asp:Labelid="Label2"style="Z-INDEX:111;LEFT:209px;POSITION:absolute;TOP:395px"runat="server">行号:</asp:Label>
 <asp:Buttonid="btnUpdateMID"style="Z-INDEX:107;LEFT:37px;POSITION:absolute;TOP:330px"runat="server"Height="36"Width="131"Text="修改MasterID"></asp:Button>
<asp:Buttonid="btnUpdateMID"style="Z-INDEX:107;LEFT:37px;POSITION:absolute;TOP:330px"runat="server"Height="36"Width="131"Text="修改MasterID"></asp:Button>
 <asp:Buttonid="btnAddForeign"style="Z-INDEX:106;LEFT:35px;POSITION:absolute;TOP:278px"runat="server"Height="36"Width="131"Text="添加外键"></asp:Button>
<asp:Buttonid="btnAddForeign"style="Z-INDEX:106;LEFT:35px;POSITION:absolute;TOP:278px"runat="server"Height="36"Width="131"Text="添加外键"></asp:Button>
 <asp:Buttonid="Button1"style="Z-INDEX:105;LEFT:31px;POSITION:absolute;TOP:217px"runat="server"Height="36px"Width="130px"Text="添加唯一键"></asp:Button><asp:buttonid="btnAddRow"style="Z-INDEX:102;LEFT:31px;POSITION:absolute;TOP:161px"runat="server"Height="36px"Width="130px"Text="添加行"></asp:button><asp:buttonid="btnAddColumn"style="Z-INDEX:101;LEFT:31px;POSITION:absolute;TOP:102px"runat="server"Height="36px"Width="130px"Text="添加列"></asp:button><asp:datagridid="dgMaster"style="Z-INDEX:103;LEFT:242px;POSITION:absolute;TOP:40px"runat="server"Height="120px"Width="485px"></asp:datagrid><asp:datagridid="dgChild"style="Z-INDEX:104;LEFT:240px;POSITION:absolute;TOP:193px"runat="server"Height="111px"Width="479px"></asp:datagrid>
<asp:Buttonid="Button1"style="Z-INDEX:105;LEFT:31px;POSITION:absolute;TOP:217px"runat="server"Height="36px"Width="130px"Text="添加唯一键"></asp:Button><asp:buttonid="btnAddRow"style="Z-INDEX:102;LEFT:31px;POSITION:absolute;TOP:161px"runat="server"Height="36px"Width="130px"Text="添加行"></asp:button><asp:buttonid="btnAddColumn"style="Z-INDEX:101;LEFT:31px;POSITION:absolute;TOP:102px"runat="server"Height="36px"Width="130px"Text="添加列"></asp:button><asp:datagridid="dgMaster"style="Z-INDEX:103;LEFT:242px;POSITION:absolute;TOP:40px"runat="server"Height="120px"Width="485px"></asp:datagrid><asp:datagridid="dgChild"style="Z-INDEX:104;LEFT:240px;POSITION:absolute;TOP:193px"runat="server"Height="111px"Width="479px"></asp:datagrid>
 <asp:TextBoxid="tbRow"style="Z-INDEX:108;LEFT:275px;POSITION:absolute;TOP:395px"runat="server"Width="54px"></asp:TextBox>
<asp:TextBoxid="tbRow"style="Z-INDEX:108;LEFT:275px;POSITION:absolute;TOP:395px"runat="server"Width="54px"></asp:TextBox>
 <asp:TextBoxid="tbCol"style="Z-INDEX:109;LEFT:422px;POSITION:absolute;TOP:395px"runat="server"Width="64px"></asp:TextBox>
<asp:TextBoxid="tbCol"style="Z-INDEX:109;LEFT:422px;POSITION:absolute;TOP:395px"runat="server"Width="64px"></asp:TextBox>
 <asp:Labelid="Label1"style="Z-INDEX:110;LEFT:520px;POSITION:absolute;TOP:399px"runat="server">值:</asp:Label>
<asp:Labelid="Label1"style="Z-INDEX:110;LEFT:520px;POSITION:absolute;TOP:399px"runat="server">值:</asp:Label>
 <asp:TextBoxid="tbResult"style="Z-INDEX:113;LEFT:585px;POSITION:absolute;TOP:394px"runat="server"Width="145px"></asp:TextBox>
<asp:TextBoxid="tbResult"style="Z-INDEX:113;LEFT:585px;POSITION:absolute;TOP:394px"runat="server"Width="145px"></asp:TextBox>
 <asp:Labelid="Label4"style="Z-INDEX:114;LEFT:209px;POSITION:absolute;TOP:344px"runat="server">表:</asp:Label>
<asp:Labelid="Label4"style="Z-INDEX:114;LEFT:209px;POSITION:absolute;TOP:344px"runat="server">表:</asp:Label>
 <asp:DropDownListid="ddlTable"style="Z-INDEX:115;LEFT:277px;POSITION:absolute;TOP:341px"runat="server">
<asp:DropDownListid="ddlTable"style="Z-INDEX:115;LEFT:277px;POSITION:absolute;TOP:341px"runat="server">
 <asp:ListItemValue="0">表一</asp:ListItem>
<asp:ListItemValue="0">表一</asp:ListItem>
 <asp:ListItemValue="1">表二</asp:ListItem>
<asp:ListItemValue="1">表二</asp:ListItem>
 </asp:DropDownList>
</asp:DropDownList>
 <asp:Buttonid="Button2"style="Z-INDEX:116;LEFT:35px;POSITION:absolute;TOP:389px"runat="server"Height="36px"Width="131px"Text="求值"></asp:Button></FONT></form>
<asp:Buttonid="Button2"style="Z-INDEX:116;LEFT:35px;POSITION:absolute;TOP:389px"runat="server"Height="36px"Width="131px"Text="求值"></asp:Button></FONT></form>
 </body>
</body>
 </HTML>
</HTML>
 后台代码:cs
后台代码:cs
 usingSystem;
usingSystem;
 usingSystem.Collections;
usingSystem.Collections;
 usingSystem.ComponentModel;
usingSystem.ComponentModel;
 usingSystem.Data;
usingSystem.Data;
 usingSystem.Drawing;
usingSystem.Drawing;
 usingSystem.Web;
usingSystem.Web;
 usingSystem.Web.SessionState;
usingSystem.Web.SessionState;
 usingSystem.Web.UI;
usingSystem.Web.UI;
 usingSystem.Web.UI.WebControls;
usingSystem.Web.UI.WebControls;
 usingSystem.Web.UI.HtmlControls;
usingSystem.Web.UI.HtmlControls;

 namespaceDsAndXML
namespaceDsAndXML


 {
{

 /**////<summary>
/**////<summary>
 ///CodeUse的摘要说明。
///CodeUse的摘要说明。
 ///</summary>
///</summary>
 publicclassCodeUse:System.Web.UI.Page
publicclassCodeUse:System.Web.UI.Page


 {
{
 protectedSystem.Web.UI.WebControls.ButtonbtnAddColumn;
protectedSystem.Web.UI.WebControls.ButtonbtnAddColumn;
 protectedSystem.Web.UI.WebControls.ButtonbtnAddRow;
protectedSystem.Web.UI.WebControls.ButtonbtnAddRow;
 protectedSystem.Web.UI.WebControls.DataGriddgMaster;
protectedSystem.Web.UI.WebControls.DataGriddgMaster;
 protectedSystem.Web.UI.WebControls.DataGriddgChild;
protectedSystem.Web.UI.WebControls.DataGriddgChild;
 protectedSystem.Web.UI.WebControls.ButtonButton1;
protectedSystem.Web.UI.WebControls.ButtonButton1;
 protectedSystem.Web.UI.WebControls.ButtonbtnAddForeign;
protectedSystem.Web.UI.WebControls.ButtonbtnAddForeign;
 protectedSystem.Web.UI.WebControls.ButtonbtnUpdateMID;
protectedSystem.Web.UI.WebControls.ButtonbtnUpdateMID;
 protectedSystem.Web.UI.WebControls.TextBoxtbRow;
protectedSystem.Web.UI.WebControls.TextBoxtbRow;
 protectedSystem.Web.UI.WebControls.TextBoxtbCol;
protectedSystem.Web.UI.WebControls.TextBoxtbCol;
 protectedSystem.Web.UI.WebControls.LabelLabel1;
protectedSystem.Web.UI.WebControls.LabelLabel1;
 protectedSystem.Web.UI.WebControls.LabelLabel2;
protectedSystem.Web.UI.WebControls.LabelLabel2;
 protectedSystem.Web.UI.WebControls.LabelLabel3;
protectedSystem.Web.UI.WebControls.LabelLabel3;
 protectedSystem.Web.UI.WebControls.TextBoxtbResult;
protectedSystem.Web.UI.WebControls.TextBoxtbResult;
 protectedSystem.Web.UI.WebControls.LabelLabel4;
protectedSystem.Web.UI.WebControls.LabelLabel4;
 protectedSystem.Web.UI.WebControls.DropDownListddlTable;
protectedSystem.Web.UI.WebControls.DropDownListddlTable;
 protectedSystem.Web.UI.WebControls.ButtonButton2;
protectedSystem.Web.UI.WebControls.ButtonButton2;
 protectedSystem.Web.UI.WebControls.ButtonbtnUpdateDs;
protectedSystem.Web.UI.WebControls.ButtonbtnUpdateDs;
 protectedSystem.Web.UI.WebControls.ButtonbtnCreate;
protectedSystem.Web.UI.WebControls.ButtonbtnCreate;

 privatevoidPage_Load(objectsender,System.EventArgse)
privatevoidPage_Load(objectsender,System.EventArgse)


 {
{
 //在此处放置用户代码以初始化页面
//在此处放置用户代码以初始化页面
 }
}


 WebFormDesignergeneratedcode#regionWebFormDesignergeneratedcode
WebFormDesignergeneratedcode#regionWebFormDesignergeneratedcode
 overrideprotectedvoidOnInit(EventArgse)
overrideprotectedvoidOnInit(EventArgse)


 {
{
 //
//
 //CODEGEN:该调用是ASP.NETWeb窗体设计器所必需的。
//CODEGEN:该调用是ASP.NETWeb窗体设计器所必需的。
 //
//
 InitializeComponent();
InitializeComponent();
 base.OnInit(e);
base.OnInit(e);
 }
}


 /**////<summary>
/**////<summary>
 ///设计器支持所需的方法-不要使用代码编辑器修改
///设计器支持所需的方法-不要使用代码编辑器修改
 ///此方法的内容。
///此方法的内容。
 ///</summary>
///</summary>
 privatevoidInitializeComponent()
privatevoidInitializeComponent()


 {
{
 this.btnCreate.Click+=newSystem.EventHandler(this.btnCreate_Click);
this.btnCreate.Click+=newSystem.EventHandler(this.btnCreate_Click);
 this.btnAddRow.Click+=newSystem.EventHandler(this.btnAddRow_Click);
this.btnAddRow.Click+=newSystem.EventHandler(this.btnAddRow_Click);
 this.btnAddColumn.Click+=newSystem.EventHandler(this.btnAddColumn_Click);
this.btnAddColumn.Click+=newSystem.EventHandler(this.btnAddColumn_Click);
 this.Button1.Click+=newSystem.EventHandler(this.Button1_Click);
this.Button1.Click+=newSystem.EventHandler(this.Button1_Click);
 this.btnAddForeign.Click+=newSystem.EventHandler(this.btnAddForeign_Click);
this.btnAddForeign.Click+=newSystem.EventHandler(this.btnAddForeign_Click);
 this.btnUpdateMID.Click+=newSystem.EventHandler(this.btnUpdateMID_Click);
this.btnUpdateMID.Click+=newSystem.EventHandler(this.btnUpdateMID_Click);
 this.Button2.Click+=newSystem.EventHandler(this.Button2_Click);
this.Button2.Click+=newSystem.EventHandler(this.Button2_Click);
 this.btnUpdateDs.Click+=newSystem.EventHandler(this.btnUpdateDs_Click);
this.btnUpdateDs.Click+=newSystem.EventHandler(this.btnUpdateDs_Click);
 this.Load+=newSystem.EventHandler(this.Page_Load);
this.Load+=newSystem.EventHandler(this.Page_Load);

 }
}
 #endregion
#endregion

 privatevoidbtnCreate_Click(objectsender,System.EventArgse)
privatevoidbtnCreate_Click(objectsender,System.EventArgse)


 {
{
 DataSetdsUntyped=newDataSet("myDS");//创建数据集
DataSetdsUntyped=newDataSet("myDS");//创建数据集
 DataTabledtMaster=newDataTable("Master");//创建数据表
DataTabledtMaster=newDataTable("Master");//创建数据表
 DataTabledtChild=newDataTable("Child");
DataTabledtChild=newDataTable("Child");
 dsUntyped.Tables.Add(dtMaster);//把数据表添加到数据集中
dsUntyped.Tables.Add(dtMaster);//把数据表添加到数据集中
 dsUntyped.Tables.Add(dtChild);
dsUntyped.Tables.Add(dtChild);
 Session["ds"]=dsUntyped;
Session["ds"]=dsUntyped;

 }
}

 privatevoidbtnAddColumn_Click(objectsender,System.EventArgse)
privatevoidbtnAddColumn_Click(objectsender,System.EventArgse)


 {
{
 DataSetdsUntyped=(DataSet)Session["ds"];
DataSetdsUntyped=(DataSet)Session["ds"];
 dsUntyped.Tables["Master"].Columns.Add("MasterID",typeof(int));
dsUntyped.Tables["Master"].Columns.Add("MasterID",typeof(int));
 dsUntyped.Tables["Master"].Columns.Add("MasterValue",typeof(string));
dsUntyped.Tables["Master"].Columns.Add("MasterValue",typeof(string));
 dsUntyped.Tables["Child"].Columns.Add("MasterLink",typeof(int));
dsUntyped.Tables["Child"].Columns.Add("MasterLink",typeof(int));
 dsUntyped.Tables["Child"].Columns.Add("ChildID",typeof(int));
dsUntyped.Tables["Child"].Columns.Add("ChildID",typeof(int));
 dsUntyped.Tables["Child"].Columns.Add("ChildValue",typeof(string));
dsUntyped.Tables["Child"].Columns.Add("ChildValue",typeof(string));
 //修改表头
//修改表头
 dsUntyped.Tables["Master"].Columns["MasterID"].Caption="主ID";
dsUntyped.Tables["Master"].Columns["MasterID"].Caption="主ID";
 dsUntyped.Tables["Master"].Columns["MasterValue"].Caption="值";
dsUntyped.Tables["Master"].Columns["MasterValue"].Caption="值";
 Session["ds"]=dsUntyped;
Session["ds"]=dsUntyped;
 Bind();
Bind();
 }
}

 privatevoidbtnAddRow_Click(objectsender,System.EventArgse)
privatevoidbtnAddRow_Click(objectsender,System.EventArgse)


 {
{
 try
try


 {
{
 DataSetdsUntyped=(DataSet)Session["ds"];
DataSetdsUntyped=(DataSet)Session["ds"];
 //为Master表添加两行
//为Master表添加两行
 DataRowdr=dsUntyped.Tables["Master"].NewRow();
DataRowdr=dsUntyped.Tables["Master"].NewRow();
 dr["MasterID"]=1;
dr["MasterID"]=1;
 dr["MasterValue"]="One";
dr["MasterValue"]="One";
 dsUntyped.Tables["Master"].Rows.Add(dr);
dsUntyped.Tables["Master"].Rows.Add(dr);
 dr=dsUntyped.Tables["Master"].NewRow();
dr=dsUntyped.Tables["Master"].NewRow();
 dr["MasterID"]=2;
dr["MasterID"]=2;
 dr["MasterValue"]="Two";
dr["MasterValue"]="Two";
 dsUntyped.Tables["Master"].Rows.Add(dr);
dsUntyped.Tables["Master"].Rows.Add(dr);
 //为child表添加1行
//为child表添加1行
 dr=dsUntyped.Tables["Child"].NewRow();
dr=dsUntyped.Tables["Child"].NewRow();
 dr["MasterLink"]=1;
dr["MasterLink"]=1;
 dr["ChildID"]=1;
dr["ChildID"]=1;
 dr["ChildValue"]="ChildOne";
dr["ChildValue"]="ChildOne";
 dsUntyped.Tables["Child"].Rows.Add(dr);
dsUntyped.Tables["Child"].Rows.Add(dr);
 Session["ds"]=dsUntyped;
Session["ds"]=dsUntyped;
 Bind();
Bind();
 }
}
 catch(Exceptionee)
catch(Exceptionee)


 {
{
 Response.Write(ee.Message);
Response.Write(ee.Message);
 }
}

 }
}
 //添加唯一键
//添加唯一键
 privatevoidButton1_Click(objectsender,System.EventArgse)
privatevoidButton1_Click(objectsender,System.EventArgse)


 {
{
 DataSetdsUntyped=(DataSet)Session["ds"];
DataSetdsUntyped=(DataSet)Session["ds"];
 System.Data.UniqueConstraintuc=newUniqueConstraint("unqi",dsUntyped.Tables["Master"].Columns["MasterID"]);
System.Data.UniqueConstraintuc=newUniqueConstraint("unqi",dsUntyped.Tables["Master"].Columns["MasterID"]);
 dsUntyped.Tables["Master"].Constraints.Add(uc);
dsUntyped.Tables["Master"].Constraints.Add(uc);
 Session["ds"]=dsUntyped;
Session["ds"]=dsUntyped;
 }
}
 privatevoidBind()
privatevoidBind()


 {
{
 DataSetdsUntyped=(DataSet)Session["ds"];
DataSetdsUntyped=(DataSet)Session["ds"];
 dgMaster.DataSource=dsUntyped.Tables["Master"].DefaultView;
dgMaster.DataSource=dsUntyped.Tables["Master"].DefaultView;
 dgChild.DataSource=dsUntyped.Tables["Child"].DefaultView;
dgChild.DataSource=dsUntyped.Tables["Child"].DefaultView;
 this.DataBind();
this.DataBind();
 }
}

 privatevoidbtnAddForeign_Click(objectsender,System.EventArgse)
privatevoidbtnAddForeign_Click(objectsender,System.EventArgse)


 {
{
 DataSetdsUntyped=(DataSet)Session["ds"];
DataSetdsUntyped=(DataSet)Session["ds"];
 System.Data.ForeignKeyConstraintfc=newForeignKeyConstraint("fc",dsUntyped.Tables["Master"].Columns["MasterID"],dsUntyped.Tables["Child"].Columns["MasterLink"]);
System.Data.ForeignKeyConstraintfc=newForeignKeyConstraint("fc",dsUntyped.Tables["Master"].Columns["MasterID"],dsUntyped.Tables["Child"].Columns["MasterLink"]);
 dsUntyped.Tables["Child"].Constraints.Add(fc);
dsUntyped.Tables["Child"].Constraints.Add(fc);
 Session["ds"]=dsUntyped;
Session["ds"]=dsUntyped;

 }
}

 privatevoidbtnUpdateMID_Click(objectsender,System.EventArgse)
privatevoidbtnUpdateMID_Click(objectsender,System.EventArgse)


 {
{
 DataSetdsUntyped=(DataSet)Session["ds"];
DataSetdsUntyped=(DataSet)Session["ds"];
 dsUntyped.Tables["Master"].Rows[0]["MasterID"]=4;
dsUntyped.Tables["Master"].Rows[0]["MasterID"]=4;
 Bind();
Bind();
 }
}

 privatevoidButton2_Click(objectsender,System.EventArgse)
privatevoidButton2_Click(objectsender,System.EventArgse)


 {
{
 DataSetdsUntyped=(DataSet)Session["ds"];
DataSetdsUntyped=(DataSet)Session["ds"];
 intnIndexTb=int.Parse(ddlTable.SelectedItem.Value);
intnIndexTb=int.Parse(ddlTable.SelectedItem.Value);
 intnIndexRow=int.Parse(tbRow.Text);
intnIndexRow=int.Parse(tbRow.Text);
 intnIndexCol=int.Parse(tbCol.Text);
intnIndexCol=int.Parse(tbCol.Text);
 objectobj=dsUntyped.Tables[nIndexTb].Rows[nIndexRow][nIndexCol];
objectobj=dsUntyped.Tables[nIndexTb].Rows[nIndexRow][nIndexCol];
 tbResult.Text=obj.ToString();
tbResult.Text=obj.ToString();

 }
}

 privatevoidbtnUpdateDs_Click(objectsender,System.EventArgse)
privatevoidbtnUpdateDs_Click(objectsender,System.EventArgse)


 {
{
 DataSetdsUntyped=(DataSet)Session["ds"];
DataSetdsUntyped=(DataSet)Session["ds"];
 intnIndexTb=int.Parse(ddlTable.SelectedItem.Value);
intnIndexTb=int.Parse(ddlTable.SelectedItem.Value);
 intnIndexRow=int.Parse(tbRow.Text);
intnIndexRow=int.Parse(tbRow.Text);
 intnIndexCol=int.Parse(tbCol.Text);
intnIndexCol=int.Parse(tbCol.Text);
 dsUntyped.Tables[nIndexTb].Rows[nIndexRow][nIndexCol]=tbResult.Text;
dsUntyped.Tables[nIndexTb].Rows[nIndexRow][nIndexCol]=tbResult.Text;
 Session["ds"]=dsUntyped;
Session["ds"]=dsUntyped;
 Bind();
Bind();
 }
}
 }
}
 }
}
 如何把利用DataSet的GetXml()方法获得的字符串再转成DataSet对象
如何把利用DataSet的GetXml()方法获得的字符串再转成DataSet对象
 DataSetds=db.ExecSqlForDataSet(strSQL);
DataSetds=db.ExecSqlForDataSet(strSQL);
 stringstrDS=ds.GetXml();
stringstrDS=ds.GetXml();



 //如何把strDS转换成DataSet对象??
//如何把strDS转换成DataSet对象??

 --------------------------------------------------------------------------------
--------------------------------------------------------------------------------

 StringstrDS="
StringstrDS="
 "
"
 System.IO.StringReaderreader=newSystem.IO.StringReader(strDS);
System.IO.StringReaderreader=newSystem.IO.StringReader(strDS);
 ds.ReadXml(reader);
ds.ReadXml(reader);
 reader.Close();
reader.Close();
【DataSet 添加数据集、行、列、主键和外键等操作示例】相关文章:
