ADO.NET最佳实践(下)[4]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 spidertan 的 blog

            象xml格式文件一样读写一个dataset的内容。

            利用diffgrams从dataset中读写内容,下面的例子显示在提交更改之前更新表中一行数据的结果,其中customerid为alfki的那一行数据被修改但是还没有更新:

<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">

  <customerdataset>

    <customers diffgr:id="customers1" msdata:roworder="0" diffgr:haschanges="modified">

      <customerid>alfki</customerid>

      <companyname>new company</companyname>

    </customers>

    <customers diffgr:id="customers2" msdata:roworder="1" diffgram:haserrors="true">

      <customerid>anatr</customerid>

      <companyname>ana trujillo emparedados y helados</companyname>

    </customers>

    <customers diffgr:id="customers3" msdata:roworder="2">

      <customerid>anton</customerid>

      <companyname>antonio moreno taquerí­a</companyname>

    </customers>

    <customers diffgr:id="customers4" msdata:roworder="3">

本文关键:数据库设计
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top