如何将datagridview中的更改更新回数据库? [英] How do I update changes in a datagridview back to the database?

查看:255
本文介绍了如何将datagridview中的更改更新回数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用datatable作为datagridview的源代码。如何将datagridview中所做的更改保存回数据库?

I use a datatable as source for the datagridview. How do I save changes made in the datagridview back to the database?

推荐答案

我想你必须调用Update方法当您要保存更改时,适配器。

I think you have to call the Update method of the adapter when you want to save the changes.

http://msdn.microsoft.com/en-us/library/system.data.common.dataadapter.update%28v=VS .100%29.aspx

这篇关于如何将datagridview中的更改更新回数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆