snowboardr
Programmer
It doesnt seem to be updating my db using this: It doesn't give me an error it just doesn't update.
I don't need to update the checkboxes in this code because i have <% if checkbox1 = "True" then Response.write "Checked" %>
I am using Access 2002 I have tried "True" & "False" and -1 and 0 ... when I response.write the checkbox field it shows up as True, so that is what I have been trying to do to update it as well.
Any ideas?
Code:
If Request.QueryString("mode") = "update" then
set my_conn= Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.RecordSet")
my_conn.Open ConnString '# I have ConnString = db.mdb etc in my code..
checkbox1 = rs("checkbox1")
If checkbox1 = "False" then
message = "Account status updated! test1"
'sql update here
SQL = "UPDATE users SET checkbox1 =" & "True WHERE user_id =" & "'" & rs("user_id") & "'"
rs = my_conn.Execute (StrSQL)
Else
SQL = "UPDATE users SET checkbox1 =" & "False WHERE user_id =" & "'" & rs("user_id") & "'"
rs = my_conn.Execute (StrSQL)
End if
End If
I don't need to update the checkboxes in this code because i have <% if checkbox1 = "True" then Response.write "Checked" %>
I am using Access 2002 I have tried "True" & "False" and -1 and 0 ... when I response.write the checkbox field it shows up as True, so that is what I have been trying to do to update it as well.
Any ideas?