WebNickson
Programmer
Hi,
I've a performance problem when calling an oracle stored procedure for a record insertion. Below is my code :
For n = 1 to 5
...Some other code...
Set Command1 = Server.CreateObject("ADODB.Command"
With Command1
.ActiveConnection = CONN_STRING
.CommandText = "SP_ABC"
.CommandType = adCmdStoredProc
.CommandTimeout = 0
.Prepared = true
.Parameters.Append Command1.CreateParameter("RV_FROMCODE", 200, 1,6,strTemp
)
.Parameters.Append Command1.CreateParameter("RV_RESULT", 200, 1,6)
.Execute()
End With
strResult = Command1.Parameters("RV_RESULT"
...Some other code...
Next
The code is kind of inefficient like I am creating the command obj in each loop!
Could someone advise me on how to optimize the code?
rgds,
Nickson
I've a performance problem when calling an oracle stored procedure for a record insertion. Below is my code :
For n = 1 to 5
...Some other code...
Set Command1 = Server.CreateObject("ADODB.Command"
With Command1
.ActiveConnection = CONN_STRING
.CommandText = "SP_ABC"
.CommandType = adCmdStoredProc
.CommandTimeout = 0
.Prepared = true
.Parameters.Append Command1.CreateParameter("RV_FROMCODE", 200, 1,6,strTemp
.Parameters.Append Command1.CreateParameter("RV_RESULT", 200, 1,6)
.Execute()
End With
strResult = Command1.Parameters("RV_RESULT"
...Some other code...
Next
The code is kind of inefficient like I am creating the command obj in each loop!
Could someone advise me on how to optimize the code?
rgds,
Nickson