why this update statement doesnt work
hi all, please check this code vb.net
VB Code:
Dim contact As Byte = CByte(radioyes.Checked)
Dim db As New OleDb.OleDbConnection(dbstring), usercode As Long = Request.Cookies("usercode").Value
'executing several updates
db.Open()
Dim cmd As New OleDb.OleDbCommand("update [users] set users.birthdate = #" & txtbirthdate.Text & "# where users.serial = " & usercode.ToString, db)
Dim xx As Long
xx = cmd.ExecuteNonQuery()
Dim cmd2 As New OleDb.OleDbCommand("update [users] set users.mail = '" & txtemail.Text & "' where users.serial = " & usercode.ToString, db)
cmd2.ExecuteNonQuery()
Dim cmd3 As New OleDb.OleDbCommand("update [users] set users.contact = " & CByte(radioyes.Checked).ToString & " where users.serial = " & usercode.ToString, db)
cmd3.ExecuteNonQuery()
db.Close()
Response.Redirect("frmview.aspx")
this is supposed to update a user profile on an asp web page.
i have checked the usercode variable and it is working fine, but the database is not updated.
no errors are generated , but the data still the same
can anyone help me here ?????
thx in advance