Hello,
I am new at this forum. It's been years since I did classic ASP. I need help with call stored proc.
Stored proc "usp_Stipend_Check_Status"
my code
I am new at this forum. It's been years since I did classic ASP. I need help with call stored proc.
Stored proc "usp_Stipend_Check_Status"
@record_number
@new_status_id
@comment optional
@rejection_reason_id
my code
Code:
Function Submit_usp_Stipend_Check_Status(RecNum, new_status_id, comment, recjReason)
on error resume next
Const adCmdStoredProc = 4
Set cmd = Server.CreateObject("ADODB.Command")
if cmd.State <> adStateOpen then Set cmd.ActiveConnection = conn 'conn 'connTest
cmd.CommandText = "usp_Stipend_Check_Status"
cmd.CommandType = adCmdStoredProc 'adOpenStatic
cmd.Parameters("@record_number") = RecNum 'CODE DOESN'T EXECUTE PASS THIS POINT
cmd.Parameters("@new_status_id") = new_status_id
if len(comment) <> 0 then cmd.Parameters("@comment") = comment
if len(recjReason) <> 0 then cmd.Parameters("@rejection_reason_id") = recjReason
Submit_usp_Stipend_Check_Status = cmd.Execute()
Set cmd = Nothing
LogFile = LogToFile("Call usp_Stipend_Check_Status " & RecNum & ", " & new_status_id)
if Err.number > 0 then
LogToFile(Err.number & ". " & Err.Description)
Err.Clear
end if
on Error goto 0
End Function