Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 31st, 2004, 11:37 AM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default ProgressBar and long event

Hi guys

I have an Oracle stored procedure that I invoke from VB from a form. I run this asynchronously so that I can continue working with other forms etc while the procedure is executing. The procedure writes it's progress to a table as intervals.

I want to be able to execute some SQL in VB to retrieve the progress from this table at regular time intervals so that I can use this to display a ProgressBar in VB to let the user know how far the procedure has executed.

I call this Oracle procedure in UserForm_Initialize of a little form that displays the progressbar. Once the UserForm_Initalize function has been executed, the form shows the progressbar. It is at this stage that I need to invoke the timer and therefore call some VB function to retrieve the progress from the table.

Has anyone done this before or does anyone know how to execute a VB function at regular timed intervals?

Many thanks in advance for any help you can provide

Cheers

Ciaran
Reply With Quote
  #2 (permalink)  
Old March 31st, 2004, 02:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

can you just add a Timer control in your little form and use the Timer event?

Marco
Reply With Quote
  #3 (permalink)  
Old April 1st, 2004, 04:41 AM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Marco

I don't seem to be able to find the timer control. I'm using VBA rather than VB.

Do you know where I can find this control?

Many thanks

Ciaran
Reply With Quote
  #4 (permalink)  
Old April 1st, 2004, 06:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Another option is to open a withevents recordset asynchronously and use the FetchProgress event for your progress bar. See http://support.microsoft.com/default.aspx?kbid=262311 for an example.

hth
Phil
Reply With Quote
  #5 (permalink)  
Old April 1st, 2004, 07:22 AM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There problem is because I'm calling an Oracle procedure, I am using Conn.Execute command that is basically calling the procedure. I'm not retrieving anything using a recordset.

The procedure is updating a value in the database so this is what I need to query at regular time intervals so that I can publish the value in the progressbar.

Is there another way around this?
I would have thought that there is an timer control that you can reference in your VBA project.


Cheers

Ciaran
Reply With Quote
  #6 (permalink)  
Old April 1st, 2004, 07:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

I'm not much of a VBA user myself. The only thing I've seen is Word and Excel application objects have an OnTime event, but apart from that I'm clueless
Reply With Quote
  #7 (permalink)  
Old April 1st, 2004, 05:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is a possible solution for you (not the first to ask this question...)

http://www.vbdesign.net/activecad/how_to/modeless.html

Marco
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Long Long int to bin walid C# 0 January 23rd, 2007 12:47 PM
progressbar vnt C# 0 May 11th, 2005 08:14 PM
string to "long long" without using atoll sarraju C++ Programming 2 August 4th, 2004 07:19 AM
Progressbar ! minhtri Classic ASP Basics 3 June 1st, 2004 11:47 AM
Modifying long text in a long field sajsal Classic ASP Databases 1 February 20th, 2004 12:36 PM



All times are GMT -4. The time now is 08:27 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.