cannot update record
Hi,
I have a strange problem.
I can add records to my sql db but I cannot update records
and sth more interesting I get no errors.
here is the code in the event handler
I have a form with some textboxes and update button
Sub btn_update(Source as Object,E as Eventargs)
Dim strSQL2 as string
strSql2 = "UPDATE cmm_users set email=@email,Firstname=@Fname where userID=@userID"
objConnection = New SQLConnection(strConnection)
cmd = New SQLCommand(strSQL2, objConnection)
cmd.Parameters.Add(New SQLParameter("@email",user_email.text))
cmd.Parameters.Add(New SQLParameter("@Fname",firstname.text))
cmd.Parameters.Add(New SQLParameter("@userID",session("myUserID")))
objConnection.Open()
cmd.ExecuteNonQuery
objConnection.close()
end sub
|