SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 24th, 2003, 09:01 AM
bohus bohus is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 1 bohus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!

Reply With Quote
  #2  
Old October 25th, 2003, 06:09 PM
m_lazor m_lazor is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Luxembourg
Posts: 156 m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
ID cannot be found in the table --> no update, no error message

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Database not being updated


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT