如何将3000行从DataGrid存储到数据库中 [英] HOw to store 3000 Rows From DataGrid in to the Database

查看:78
本文介绍了如何将3000行从DataGrid存储到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说,如果我有网格,并且在网格中我有一个文本框作为输入字段.而不在数据库中存储任何行,因为我没有单击保存...

现在..
(1)如果我要重定向到其他页面并返回原来输入的值,则它将保持其状态(我没有将值直接存储在DB中,而是从菜单中将所有值都重定向到了其他页面然后回来)

(2)将这3000个条目保存在数据库中的最好,最快的解决方案是什么(我不想使用for循环,然后一个一个地保存所有值....我需要某种方式来快速存储数据)

Say if I have grid and in grid I have one colum for Textbox as entry field.. Column are generated Runtime and Say if I have done 3000 Entry in textbox. and not storing any row in DB because I have not click on save...

Now..
(1) If I am Redirecting to some other page and Come back the value which I have been Entered will retain its state as it is(I am not storing the value in DB just right all the value and Redirect to some other page from menu and come back)

(2) what is the best and quick Solution to Save all this 3000 entry in DB ( I do not want to use for loop and then save all value one by one .... I need Some Way which store the data Quickly)

推荐答案

尝试使用线程,当数据在后台插入数据库时​​,用户可以继续操作.
Try using threads , while data is getting inserted to DB at background, the user can continue further.


这篇关于如何将3000行从DataGrid存储到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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