在C#中从数据库中获取数据后如何更新表 [英] How to update table after fetch data from database in c#

查看:433
本文介绍了在C#中从数据库中获取数据后如何更新表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我从表中的数据库获取记录.

现在,我想使用c#临时表来更新该表中的任何特定行,而无需数据库交互.

之后,我将使用表格.

任何想法,请告诉我

Hi
I get record from data base in table.

Now I want to update any particular row in that table using c# temporary without database interaction.

After that I will use table.

Any idea, please tell me

推荐答案

最简单的方法是数据绑定.

通过绑定源将结果集绑定到控件,编辑数据,更新并继续工作.

详细的数据绑定教程 [
The simplest way is databinding.

Bind a result set to the controls via a bindingsource, edit the data, update and continue working.

A Detailed Data Binding Tutorial[^]


您可以通过使用DataAdapters执行批处理操作来进行批处理操作

检查以下知识库文章


http://msdn.microsoft.com/en-us/library/aadf8fk2​​.aspx [ ^ ]

其他选项:

http://stackoverflow.com/questions/2879393/how-to-do-a-批量更新 [^ ]
you can do the batch operations by performing Batch Operations Using DataAdapters

check the following KB article


http://msdn.microsoft.com/en-us/library/aadf8fk2.aspx[^]

other options:

http://stackoverflow.com/questions/2879393/how-to-do-a-batch-update[^]


这篇关于在C#中从数据库中获取数据后如何更新表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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