Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - UPDATE database using ASP
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

UPDATE database using ASP

 Post Reply Post Reply
Author
dizzyfunk View Drop Down
Newbie
Newbie


Joined: 12 September 2003
Location: United Kingdom
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote dizzyfunk Quote  Post ReplyReply Direct Link To This Post Topic: UPDATE database using ASP
    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

Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2003 at 6:55am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.