Asynchronous Execution using ASP
How to execute an Oracle Stored Procedure using ASP?
Have tried executing using adAsyncExecute option in ASP code but it doesn't seems to execute the procedure.
Web Development
How to execute an Oracle Stored Procedure using ASP?
Have tried executing using adAsyncExecute option in ASP code but it doesn't seems to execute the procedure.
Here is some code which is working for me. Each line of code below is separated by a blank line to distinguish from word wrapping. Items you need to change to fit your particular database are in angle brackets <>:
Dim MyCmd
Set MyCmd = Server.CreateObject("ADODB.Command")
MyCmd.CommandType = adCmdStoredProc
MyCmd.CommandText = ""
MyCmd.ActiveConnection = "Driver={Microsoft ODBC for Oracle};Server=;uid=;pwd="
MyCmd.Execute , , adAsyncExecute
Do While (MyCmd.State And adStateExecuting) = adStateExecuting
'processing while command is executing
Loop
MyCmd.ActiveConnection.Close
Set MyCmd.ActiveConnection = Nothing
Set MyCmd = Nothing
by shanghai sam
Thank you for the code but does not help me.
This is the code which is unworkable for me. I need to execute the procedure and forget about it(pass control back to application where user can continue), i can't loop and wait for the procedure to return like what you have provided.
strCon = "Provider=MSDAORA.1;Password=;User ID=;Data Source="
set rsCon = Server.CreateObject("ADODB.Connection")
rsCon.ConnectionString = strCon
rsCon.Open
Set oCmd.ActiveConnection = rsCon
oCmd.CommandType = adCmdStoredProc
oCmd.CommandText = "ALLCAL"
oCmd.Parameters.Append oCmd.CreateParameter("catcode",adVarChar,adParamInput,4000)
oCmd.Parameters.Append oCmd.CreateParameter("caltype",adVarChar,adParamInput,4000)
oCmd.Parameters("catcode") = "E"
oCmd.Parameters("caltype") = "P"
oCmd.Execute , , adAsyncExecute
set oCmd = Nothing
by junior beng
by junior beng
This discussion is closed to new replies.
Sort by Trending