|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Database not being updated
I am using the following asp code to update an existing record in a database, but the database is not being updated. I am not receiving any errors.
ASP: 'create and open the database obj Set objConn = server.createobject("ADODB.Connection") objConn.Open Application("IssueConnPICCM") Call ConnErrCheck(objConn) 'check for errors Set objCmd = server.createobject("ADODB.Command") Set objCmd.ActiveConnection = objConn ProblemID = Trim(request.form("ProblemID")) ConfirmDate = Date& " " &Time Comments = trim(request.form("Comments")) Comments = replace(Comments, "'", "''") Status = "Closed" objCmd.CommandText = "{? = CALL sp_upd_confirm('" & _ ProblemID& "','" &_ Status& "','" &_ Comments& "','" &_ ConfirmDate& "','" &_ ReturnCode& "')}" objCmd.CommandType = adCmdText objCmd(0).Direction = adParamReturnValue objCmd.Execute ReturnCode = objCmd(0) Call ConnErrCheck(objConn) 'check for errors and here is the stored procedure it is calling: CREATE PROCEDURE sp_upd_confirm(@problem_id int, @status varchar(20), @comments varchar(4000), @confirm_date datetime, @return_code int OUTPUT) AS UPDATE Issues SET Status = @status, Comments = @comments, ConfirmDateTime = @confirm_date WHERE ProblemID = @problem_id if @@error = 0 begin set @return_code = 0 end else begin set @return_code = 1 end return @return_code GO Any ideas of what I am missing? Thank you in advance! |
|
#2
|
|||
|
|||
|
ID cannot be found in the table --> no update, no error message
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Database not being updated |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|