数据从网格插入数据库. [英] data inserting from grid to database.

查看:147
本文介绍了数据从网格插入数据库.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!
如何将数据放入网格的行,以及如何将数据插入网格(可能是一行或更多行)之后,必须将其保存到数据库.什么是执行任务的适当方法.
谢谢.

hi!
how to put data to row of grid and after inserting data to the grid(may be of one row or more) it has to be saved to database. what should be the appropriate method to do the task.
Thank you.

推荐答案

您可以使用SqlBulkCopy类.
一些示例是:

http://www.dotnetspider.com/resources/32958-SQL-Bulk-Copy.aspx [^ ]



http://www.sqlclr.net/Examples/tabid/55/articleType/ArticleView/articleID/11/SqlBulkCopy-Sample-Framework.aspx [
You can use SqlBulkCopy class .
Some examples are :

http://www.dotnetspider.com/resources/32958-SQL-Bulk-Copy.aspx[^]

or

http://www.sqlclr.net/Examples/tabid/55/articleType/ArticleView/articleID/11/SqlBulkCopy-Sample-Framework.aspx[^]


解释时间太长,可以参考这个获取如何通过gridview更新,删除和更新数据库的方法. ^ ]
too lengthy to explain , ok refer this u may get how to update, delete and update to the database via gridview..
http://www.c-sharpcorner.com/uploadfile/raj1979/select-add-update-and-delete-data-in-a-Asp-Net-gridview-control/[^]


这篇关于数据从网格插入数据库.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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