0
I am trying to update an ACCESS table on my website, only it displays this error:
Microsoft Access Database Engine error '80040e14'
Syntax error (missing operator) in query expression '[nome] ='.
/rh/func_update.asp, line 14
The code is this:
varnumero = Request.QueryString("num")
sql = "UPDATE funcionarios SET [ativo]='NAO' where [chapa] ="&varnumero&" ; "
set bd = Conexao.execute(sql) **linha 14 é essa**
'Response.Write(sql)
'Response.End
response.Redirect("funcionarios.asp")
@Lidiane_fernandes try so in the line of your SELECT :
sql = "UPDATE funcionarios SET [ativo]='NAO' where [chapa] ='" & varnumero &"'"
– Edvaldo Lucena
@Edvaldolucena bom dia Edvaldo, thanks for helping, gave this message here now Microsoft Access Database Engine error '80040e07' Data type Mismatch in criteria Expression. /Rh/func_update.Asp, line 14
– Lidiane Fernandes
Another error, however in the same line that was already showing error ... The test title
varnumero = Request.QueryString("num") response.write (varnumero)
and comment the rest of the code and check if the variable is loading some value.– Edvaldo Lucena
@Edvaldolucena it brings the value yes, I was trying to update the code 41 and brought in the url, in case it is loading the value, right?
– Lidiane Fernandes
your code in thesis is updating a record and in sequence is redirecting to another page, it would be interesting for you to validate if really your variable
varnumero
has some value.– Edvaldo Lucena
can post page code in full ?
– Edvaldo Lucena