Hi,pals,
I met a problem when I tried to get output string by calling a oracle stored procedure by ADO. The stored procedure is right by testing. Following is asp code,please help me check what's wrong with it.
cmd.ActiveConnection = objConn
cmd.CommandText = "AGENCY_BACK.sp_getDollarRecovered"
cmd.CommandType = adCmdStoredProc
in1 = "1234"
in2 = "agency1"
out1 =" out1"
out2 =" out2 "
cmd.Parameters.Append cmd.CreateParameter("I_Account_No", adVarChar, adParamInput, len(in1)+1,in1)
cmd.Parameters.Append cmd.CreateParameter("I_Agency_Code", adVarChar, adParamInput, len(in2)+1,in2)
cmd.Parameters.Append cmd.CreateParameter("O_Dollar_Recovered", adVarChar, adParamOutput, len(out1)+1, out1)
cmd.Parameters.Append cmd.CreateParameter("O_Reason_Code", adVarChar, adParamOutput, len(out2)+1, out2)
on error resume next
cmd.Execute
if objConn.errors.count <> 0 then
response.write "error"
else
response.write out1
response.write out2
end if
The result is :
out1 out2
That means command executed normally,but output parameter isn't set.
Anyone knows why?
Thanks,
I met a problem when I tried to get output string by calling a oracle stored procedure by ADO. The stored procedure is right by testing. Following is asp code,please help me check what's wrong with it.
cmd.ActiveConnection = objConn
cmd.CommandText = "AGENCY_BACK.sp_getDollarRecovered"
cmd.CommandType = adCmdStoredProc
in1 = "1234"
in2 = "agency1"
out1 =" out1"
out2 =" out2 "
cmd.Parameters.Append cmd.CreateParameter("I_Account_No", adVarChar, adParamInput, len(in1)+1,in1)
cmd.Parameters.Append cmd.CreateParameter("I_Agency_Code", adVarChar, adParamInput, len(in2)+1,in2)
cmd.Parameters.Append cmd.CreateParameter("O_Dollar_Recovered", adVarChar, adParamOutput, len(out1)+1, out1)
cmd.Parameters.Append cmd.CreateParameter("O_Reason_Code", adVarChar, adParamOutput, len(out2)+1, out2)
on error resume next
cmd.Execute
if objConn.errors.count <> 0 then
response.write "error"
else
response.write out1
response.write out2
end if
The result is :
out1 out2
That means command executed normally,but output parameter isn't set.
Anyone knows why?
Thanks,