请有人帮我 [英] Please some one help me

查看:90
本文介绍了请有人帮我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个grideview,它的grideview有100000条记录,我想保存在一个按钮单击事件中100000条记录的数据库中.那时我会单击该按钮
我的项目挂起.

i have grideview that grideview has 100000 records i want to save in database that 100000 records in one button click event. when i will click that button at that time
my project hang.

推荐答案

尝试批量插入概念

以下批量插入链接

http://www.c-sharpcorner.com/forums/thread/151831/bulk-insert-from-gridview-to-database.aspx [ http://forums.asp.net/t/1746258.aspx/1 [ ^ ]

希望对您有帮助

谢谢
try Bulk Insert concept

following link of bulk insert

http://www.c-sharpcorner.com/forums/thread/151831/bulk-insert-from-gridview-to-database.aspx[^]

http://forums.asp.net/t/1746258.aspx/1[^]

hope will be help you

Thanks


您使用什么代码将记录保存到数据库,一个大查询或100.000个单独的查询?
如果是第二个选项,则解决方案是重写代码以使用1个大查询.

如果这样做没有帮助,请在您的代码和设置上发布更多详细信息,我们可以尝试制定解决方案.
What code are you using to save the records to the database, one big query or 100.000 separate ones?
If it''s the second option, the solution is to rewrite the code to use 1 big query.

If this doesn''t help please post some more details on your code and setup, and we can try work out a solution.


chinmaya,

请提交您正在使用的代码.

在此之前,请尝试增加超时时间.

在您的连接字符串后面附加以下代码

; Connection Timeout =<<<以秒为单位的时间>>

增加超时时间.
chinmaya,

Please submit the code you are using.

Before that try to increase the time out.

Append the below code with your connection string

;Connection Timeout=<<time in secs>>

to increase the timeout.


这篇关于请有人帮我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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