Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1301
  • Last Modified:

Using a Progress Bar while Call a Stored Procedure with VB

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
jorgeani
Asked:
jorgeani
  • 3
1 Solution
 
mladenoviczCommented:
You will have to get feedback from command object about progress in order to display progressbar.
0
 
mladenoviczCommented:
0
 
mladenoviczCommented:
0
 
Anthony PerkinsCommented:
The simple answer is that you cannot give a realistic progress bar.  The very best you can do is make it asynchronous and enable a button to cancel the execution.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now