第五课 使用断开数据--DataSet和SqlDataAdapter(翻译)[21]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

a; mso-hansi-font-family: Verdana">的Fill方法中使用的第二个参数具有相同名字。这就是为什么我喜欢在Fill方法中指定表名字的原因,这样在后面的代码中就更具有可读性。

 

Updating Changes

更新改变

After modifications are made to the data, you'll want to write the changes back to the data base.  Refer to previous discussion in the Introduction of this article on update guidance.  The following code shows how to use the Update method of the SqlDataAdapter to push modifications back to the data base.

在对数据做了修改以后,你将需要将改变写回给数据库。参考在这篇文章开始介绍的关于update的讨论,下面的代码展示了如何使用SqlDataAdapterUpdate方法将改变传回数据库。

daCustomers.Update(dsCustomers, "Customers");

本文关键:第五课 使用断开数据--DataSet和SqlDataAdapter(翻译)
 

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

go top