使用C#在SQL Server中批量插入数据
问题描述:
当我在SQL Server中插入批量数据时,我的应用程序冻结我想要使用进度条向用户显示进程已完成
My Application is freeze When I Insert Bulk data in SQL Server I Want to use progress bar Shows to user that Process is done
答
批量批量插入和使用任务
如果你在.net4上在后台执行命令。
您也可以使用BackgroundWorker
http:/ /msdn.microsoft.com/en-us/library/cc221403%28v=vs.95%29.aspx [ ^ ]
Batch your bulk inserts and useTask
if you are on .net4 to do the command in the background.
You can also useBackgroundWorker
http://msdn.microsoft.com/en-us/library/cc221403%28v=vs.95%29.aspx[^]