如何从Gridview在数据库中插入数据?/ [英] How Can I Insert Data In Data Base From Gridview?/

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

问题描述

我想显示从文本框到gridview的值,然后从gridview到数据库。如何使用函数调用将数据从网格视图插入数据库?我已经通过创建一个新文件夹将所有quries和连接字符串放在另一个类中。

i want to display values from textboxes to gridview and then from gridview to database. how can i insert data from grid view to database by using function calls? i have put all quries nd connection string in another class by creating a new folder.

推荐答案

//请参阅以下链接

< a href =http://www.aspsnippets.com/Articles/Using-SqlBulkCopy-to-insert-bulk-data-from-GridView-to-database-in-ASPNet.aspx> http://www.aspsnippets .com / Articles / Using-SqlBulkCopy-to-insert-data-from-GridView-to-database-in-ASPNet.aspx [ ^ ]
// pls refer the following link
http://www.aspsnippets.com/Articles/Using-SqlBulkCopy-to-insert-bulk-data-from-GridView-to-database-in-ASPNet.aspx[^]


您好,

如果您使用的是SQL Server 2008或更高版本,那么您可以将DataTable传递给存储过程以从网格视图中相应地保存/更新。一篇非常好的文章被发现

以下。



将数据表发送到存储过程


谢谢
Hello ,
If you are using SQL Server 2008 or higher version then you can pass DataTable to a Stored Procedure to save / update accordingly from grid view .a very good article found
below .

Sending a DataTable to a Stored Procedure

thanks


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

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