在数据库中插入大量记录时显示详细信息 [英] Showing Detail while inserting large amount of record in databse
问题描述
嗨
我正在asp.net中工作,并将10,000条记录插入数据库.插入数据库需要25分钟.
所以它似乎页面无法正常工作.
因此,我需要在插入处理的中间获得2或3倍的插入记录数.并需要在我的aspx页面上显示该号码.
例如:总记录10,000
20秒后:插入的记录已进入数据库:1200
1分钟后:将记录插入数据库:3000
等等.
在asp.net中怎么可能?
请建议我.
感谢
Hi
I am working in asp.net and Inserting 10,000 records into my database. Its takes a 25 mints to insert into database.
So Its seems like page is not working.
So I need to get the number of inserted records in middle of processing of insertion as 2 or 3 times. and need to display the number on my aspx page.
Ex: Total records 10,000
after 20 sec : Inserted records are into database : 1200
after 1 minths: Inserted records into database are : 3000
and so on.
How it is possible in asp.net ?
Pls suggest me.
Thanks
推荐答案
有一个执行SQL插入操作的Web服务.当插入作业开始时,Web方法将返回一个令牌,客户端(您的ASP.NET应用程序)可以通过该令牌将自己标识为该SQL插入作业的所有者.启动SQL插入作业后,您可以通过Ajax从应用程序中获取当前状态.
干杯,
-MRB
Have a webservice that does the SQL insertion stuff. When the insertion job is started have the web method return a token by which the client (your ASP.NET applicaiton) can identify itself as the owner of said SQL insertion job. After the SQL insertion job has been started you can fetch the current status via Ajax from your application.
Cheers,
-MRB
这篇关于在数据库中插入大量记录时显示详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!