处理时显示进度条
如果我从开始时间到结束时间从数据库获取数据,在这段时间内(处理/查询),我想显示一个进度条(类似于“正在处理,请稍候”)。 我怎样才能做到这一点?
If I am getting data from the database from start time to end time, during that time (of processing / querying), I want to display a progress bar (something like, “Processing, please wait”). How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从数据库获取数据的步骤:
在大多数情况下,您无法说出需要多长时间,因此不要考虑进度条,而是考虑以下组合:
Steps of geting data from db:
In most cases you cannot say how much time it will take, so instead of progress bar think about combination of:
虽然您确实无法判断查询将花费多长时间,但它可以向您的用户提供已用时间/剩余时间的信息。 您可以使用 VB IDE 中的进度条控件。 然后将其“max”属性设置为查询记录数。 当您迭代记录时,进度条的“值”属性会增加。 这是一个例子; (“Rs”是 ADODB 记录集)
While its true that you cant tell how long the query is going to take, its possible to give your user and idea of the time lapsed/remaining. You use the progress bar control from your VB IDE. You then set its 'max' property to your query recordcount. As you iterate through the records increase the progress bars 'value' property. Here's an example; ('Rs' is an ADODB recordset)