从数据库请求数据时显示进度条 [英] Show Progress bar when request data from Database

查看:440
本文介绍了从数据库请求数据时显示进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个基于Windows窗体的应用程序,它与SQL服务器通信。数据库在云上可用。

我想在数据库上执行任何操作时显示进度条,例如插入/更新/删除...



任何人都可以分享一个示例来显示长时间请求使用进度条的背景吗?

Hi,
I have an windows form based application which communicates with SQL server. The database is available on clouds.
I want to show progress bar when any operation is performed on database e.g. insert/update/delete...

Can any one please share an example to show background working with progress bar for long requests?

推荐答案

对于单个操作,你不能这样做。不能保证插入语句持续多长时间。



你可以使用估计并显示与估计相比的经过时间,但请记住,实际执行时间可能会有很大差异。



通常情况下,使用不确定的进度条这些情况向用户显示操作正在进行,但没有确切的估计需要多长时间。
For single operations, you can't do this.There is no guarantee how long for example an insert statement lasts.

You could use an estimate and show the elapsed time compared to the estimate but keep in mind that the actual execution time may differ greatly.

Typically an indeterminate progress bar is used in these kinds of situation showing the user that the operation is on-going but there is no exact estimate how long it will take.


这篇关于从数据库请求数据时显示进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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