So SQL Server is better then Oracle ;) :D
That sounds like a severe limitation of Oracle. :(
Printable View
So SQL Server is better then Oracle ;) :D
That sounds like a severe limitation of Oracle. :(
This is what i use, i put the async mode in the execute, but now, how do i know when the procedure finish?
VB Code:
sSQL = "SIM_PA_CALCULO_COMISIONES.SIM_SPI_CALCULO_COMISIONES" Set mStoredProcCmd = New ADODB.Command With mStoredProcCmd .ActiveConnection = Cn .CommandType = adCmdStoredProc .CommandText = sSQL Set mStoredProcPrmIdMes = .CreateParameter("VI_NU_ID_MES", adInteger, adParamInput, 2, intMes) Set mStoredProcPrmIdAnhio = .CreateParameter("VI_NU_ID_ANHIO", adInteger, adParamInput, 4, intAnhio) Set mStoredProcPrmIdUsuario = .CreateParameter("VI_NU_ID_USUARIO", adInteger, adParamInput, , intIdUsuario) .Parameters.Append mStoredProcPrmIdMes .Parameters.Append mStoredProcPrmIdAnhio .Parameters.Append mStoredProcPrmIdUsuario End With mStoredProcCmd.Execute , , adAsyncExecute
You tried with ADO - newest version, like 2.8?Quote:
Originally Posted by GaryMazzone
Is it the Oracle driver that doesn't support it?
What version of Oracle is he using, and how is he connecting also? I don't normally use the Oracle data objects in my apps. They might have something for setting the asyncronous connection there.
Dont you just change the connectionstring for Oracle and its the same when using ADO?
Where is you returnset? Is the command bring something back to the app? The ADO call to and Oracle SP normally take the ODBC form to operate propery
VB Code:
Set dbConn = New ADODB.Connection With dbConn .Provider = "OraOLEDB.Oracle" .Properties("Data Source") = "ROWELLS" .Properties("User Id") = "wellsadmin" .Properties("Password") = "roweisgood" .Open End With Set Cmd = New ADODB.Command Set Cmd.ActiveConnection = dbConn With Cmd .Parameters.Append .CreateParameter(, adNumeric, adParamInput, , lngWellID) .Parameters.Append .CreateParameter(, adVarChar, adParamOutput, 50) .Parameters.Append .CreateParameter(, adNumeric, adParamOutput) End With If dbConn.State Then Cmd.Properties("PLSQLRSet") = True Cmd.CommandType = adCmdText Cmd.CommandText = "{CALL WellsAdmin.OneWellCount(?,?, ?)}" Set rs = Cmd.Execute() End If
Yes I am using ADO2.8 there is another set of objects that are avail from Oracle that I normally do not use.
You can use the MS supplied version of the ADO driver but I always have trouble getting a return set back using it.
no, i don't need to return anything because it's a procedure that read some values in the database and inserts some others after some calculation, so in the normal mode i just wait for it to finish and when vb has the control again, it's shows a msgbox saying it was succesfull, but in the async mode, i need to know when it's finishing and i don't know for sure if it's still running.
post 37 by RD shows how to check the status of the execution.
Did you see that?
yes, but my problem is that i don't have anything to know when it's finished, on the example he uses kind of a loop because the rs fetch his records until he reaches to the number of rows obtained in the beginning of it, i don't have anything like that, or at least that was what i understand, please correct me if i'm getting this in the worng way :)
post #34 shows how to execute a command and an "event" that fires when the command is done - that seems like it will work even if a recordset is not involved.
yes, haven't check that deeply, but my question is how or where can i call the conn_ExecuteComplete to know when the procedure is finished?Quote:
Originally Posted by RobDog888
Can you think to write own exe without interface for that job.
1. Start program
2. Set running flag up on register
3. Do job
4. Turn running flag down
5. End program
Then your main program is just watching flag on register to know when job is done.
lost again :confused: this form is part of a bigger app that is based on modal forms, and what i need is to keep having control when i call a stored procedure to show some kind of progress, i can't do it in another forms because it is modal, so async mode for the procedure call should be my answer but i don't understand it completely yet :)Quote:
Originally Posted by oh1mie
If you is working with that procerude on separated thread. Then is it is not hanging main program. You can allways show some running envelopes or another symbols until running flag is up.Quote:
Originally Posted by kathyms
This was only one view. Sometimes when we think too complicated, then there is created thousand mails code, when it needs only couple lines.