Advertisement

04.02.2008 at 03:15PM PDT, ID: 23291111
[x]
Attachment Details

Simple Update Record?

Asked by awinstead in Active Server Pages (ASP)

Tags:

Hello everyone,
I am doing a simple update record command. I have been staring at this for some time and I am not finding the problem. The page loads fine with no errors, but the content never get posted in the database. I am sure I am missing something probably quite obvious. Anyways can someone look this code over and let me know what I am missing. The page is setup with a form that reloads the page and passes variables from one section to another using if statements to control the flow. I am writing out the variables so I know they are working just the UPDATE command is having some problem.

Anyways Thanks in advance.
JesterStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
<%
Dim studemail, studphone, studnewlast, studaddress, studcity, studstate, studzip, RSVP, RSVPNotes, dtchng, idstud, studfirname, studlasname, rsvpfirname, rsvplasname, sqllink2
 
studemail = Request.Form("email2")
studphone = Request.Form("phone2")
studnewlast = Request.Form("newlast")
studaddress = Request.Form("address2")
studcity = Request.Form("city2")
studstate = Request.Form("state2")
studzip = Request.Form("zip2")
RSVP = Request.Form("RSVP")
RSVPNotes = Request.Form("rsvp_notes")
dtchng = Request.Form("dt_chng")
idstud = Request.QueryString("studentid")
studfirname = Request.Form("stud_firname")
studlasname = Request.Form("stud_lasname")
rsvpfirname = Request.Form("rsvp_firstname")
rsvplasname = Request.Form("rsvp_lastname")
 
sqllink2 = "UPDATE Contact_Info  SET Email ='" & studemail & "', Phone ='" & studphone & "', Address1 ='" & studaddress & "', City ='" & studcity & "', State ='" & studstate & "', Zip ='" & studzip & "', Married_Lastname ='" & studnewlast & "', Date_Updated = '" & dtchng & " WHERE person_id = " & idstud 
 
set Update_ctinf = Server.CreateObject("ADODB.Command")
	Update_ctinf.ActiveConnection = MM_Smart_Reunion_STRING
	Update_ctinf.CommandText = sqllink2
	Update_ctinf.CommandType = 1
	Update_ctinf.CommandTimeout = 0
	Update_ctinf.Prepared = true
	Update_ctinf.Execute()
 
 
Response.Write(sqllink2) & "<br/>"
 
	
Response.Write("Step 1 passed<br/>")
 
 
%>
[+][-]04.02.2008 at 03:25PM PDT, ID: 21268175

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.02.2008 at 03:30PM PDT, ID: 21268209

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 03:41PM PDT, ID: 21268272

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: ASP
Sign Up Now!
Solution Provided By: awinstead
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628