Print Page | Close Window

UPDATE database using ASP

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=5796
Printed Date: 30 March 2026 at 12:16pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: UPDATE database using ASP
Posted By: dizzyfunk
Subject: UPDATE database using ASP
Date Posted: 17 September 2003 at 5:28am
does UPDATE work inthe same way as INSERT? (as in the code below?)

i can only find examples of RS.UPDATE but as my strSQL is quite long, i want to do it in a way similar to my code (bascially i'm not sure how to do it the RS.UPDATE way with all the fields i have!!)

code:
------------------------------------------------------------ --------------------

set conn = Server.CreateObject("ADODB.Connection")
conn.Open conn_STRING 'this is set in an include file

strSQL = "UPDATE resource_t SET title_c = '" & strTitle & "' AND firstname_c = '" & strFirstname & "' AND surname_c = '" & strSurname & "' AND address1_c = '" & strAddress1 & "' AND address2_c = '" & strAddress2 & "' AND city_c = '" & strCity & "' AND county_c = '" & strCounty & "' AND postcode_c = '" & strPostcode & "' AND postalarea_c = '" & strPostalarea & "' AND dob_c = '" & strDOB & "' AND gender_c = '" & strGender & "' AND hometel_c = '" & strHometel & "' AND mobiletel_c = '" & strMobiletel & "' AND fpc3_c = " & strFpc3 & " AND cemap_c = " & strCemap & " AND g10_c = " & strG10 & " AND g60_c = " & strG60 & " AND afpc_c = " & strAfpc & " AND otherqual_c = '" & strOtherqual & "' AND cursalary_c = '" & strCursalary & "' AND curdayrate_c = '" & strCurdayrate & "' AND curjobtitle_c = '" & strCurjobtitle & "' AND prevmanexp_c = " & strPrevmanexp & " AND prevreviewexp_c = " & strPrevreviewexp & " AND prevqualass_c = " & strPrevqualass & " AND workaway_c = " & strWorkaway & " WHERE id_c = " & strUid & ""

conn.Execute (strSQL)

conn.Close
set conn = nothing

------------------------------------------------------------ --------------------

i just can't get it to update the DB?!?!?!

any help muchly appreicated




Replies:
Posted By: KCWebMonkey
Date Posted: 17 September 2003 at 6:55am

Read this page:

http://www.webwiz.net/asp/tutorials/updating_data_from_database_pt3.asp - http://www.webwiz.net/asp/tutorials/updating_data_from _database_pt3.asp




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net