1 / 6

C# DataGridView 更新操作 讲师:小浩

DataGridView 更新数据库. C# DataGridView 更新操作 讲师:小浩. 主要内容. 1 、上一讲回顾 2 、对控件进行美化 3 、更新数据具体实现方法 第一种、实时更新数据 第二种、批量更新 1 、要了解的知识 2 、具体实现. 批量更新数据要了解的知识. 1 、 SqlCommandBuilder 类. 自动生成单表命令,用于将对 DataSet 所做的更改与 关联的 SQL Server 数据库的更改相协调.

phyre
Download Presentation

C# DataGridView 更新操作 讲师:小浩

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DataGridView更新数据库 C#DataGridView更新操作讲师:小浩

  2. 主要内容 1、上一讲回顾 2、对控件进行美化 3、更新数据具体实现方法 第一种、实时更新数据 第二种、批量更新 1、要了解的知识 2、具体实现

  3. 批量更新数据要了解的知识 1、SqlCommandBuilder类 自动生成单表命令,用于将对 DataSet 所做的更改与 关联的 SQL Server 数据库的更改相协调

  4. 2、SqlDataAdapter对象的Update() 方法 (有五个重载方法) 为 DataSet中每个已插入、已更新或已 删除的行调用相应的 INSERT、UPDATE 或 DELETE 语句。 3、DataTable对象的AcceptChanges()方法 提交自上次调用 AcceptChanges 以来对该行进行的所有更改 在操作中这个方法可以根据实际需要来添加,通过这个方法来 和数据库中的数据匹配如果更改过就把现在的数据更新数据库.

  5. 谢谢收看 下一节内容: 自定义数据列和一个简单的右键菜单 The End

More Related