Solved

Add a Progress Bar when i call a PL/SQL with ADO Command

Posted on 2004-09-03
1
485 Views
Last Modified: 2013-12-25
Hi i Have a question.... How can i add a progress bar while my VB code call a Stored Procedure?
I have this code:

        Dim oCon As Connection
        Dim oCmd As Command
        Set oCmd.ActiveConnection = oCon
        oCmd.CommandType = adCmdStoredProc
        nRetorno = 0
        oCmd.Parameters.Append oCmd.CreateParameter("n1", adInteger, adParamInput, len(value), value)
        oCmd.Parameters.Append oCmd.CreateParameter("nRetorno", adInteger, adParamOutput)
        oCmd.Parameters.Append oCmd.CreateParameter("sRetorno", adVarChar, adParamOutput, 200)
        oCmd.CommandTimeout = 10000
        DoEvents
        oCmd.Execute
        nRetorno = oCmd.Parameters("nRetorno").
       ... etc.


I ask that because when VB execute this command Line oCmd.Execute the screen waits until the Stored Procedure finish, and the user can´t wait around 10 minutes for example while the PL/SQL process 1 million of records. And for this reason i want to add a Progress Bar, but i don´t know how can i add  this control is this code.

Thanks a lot.
0
Comment
Question by:jorgeani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

by:
JR2003 earned 250 total points
ID: 11972346
You could use an animation control instead.
Add an animation control to your form. This is available in "Microsoft Common Controls-2"
Put the required animation on in the application directory. These are availabe in the
C:\Program Files\Microsoft Visual Studio\Common\Graphics\Videos
directory.


'In the form load event
Private Sub Form_Load()
    Animation1.Open App.Path & "\search.avi"



'In the function that calls the stored procedure:
    Animation1.AutoPlay = True
    DoEvents 'Allow the animation to run on a separate thread.

    'Call the stored procedure here
    '...
    '...
    '...

    'Stop the animation control
    Animation1.AutoPlay = False

JR
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question