| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
2 updates from sql - need help
Hi,
I'm sure there's an easy answer to this one but I'm pretty green when it comes to asp and would appreciate help: I want to update 2 fields in an Access database, both in the same table (oitems). I have 2 sql statements and I want to run them both from if strCheck = "1" then (that just says if a checkbox is checked do the following): strSQL = "UPDATE oitems SET checkbox = '" & strCheck & "'" & "WHERE orderitemid = " & strID strSQL = "UPDATE oitems SET picked1 = numitems WHERE orderitemid = " & strID The first marks a checkbox as 'checked' then that value is read back from the db on redirect. Fine, it works The second makes the field 'picked1' have the same value as the field 'numitems'. That works too But I don't know how to get it to do both at the same time Any help greatly appreciated Malc |
|
#2
|
||||
|
||||
|
Use:
strSQL = "UPDATE oitems SET checkbox = '" & strCheck & "' , [picked1] = [numitems] WHERE orderitemid = " & strID |
|
#3
|
|||
|
|||
|
that works perfectly. Thanks a million!
|
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > 2 updates from sql - need help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|