Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá pessoal do imasters ! Estou com um problema num sistema de remoção de email de um boletim informativo. Quando coloco um email pra remover ocorre um erro. Já dei uma olhada aqui em tudo, reolhei e o bicho tá pegando... se puderem me ajudar :) Abraço a todos.
O erro:
------------------------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.1.18-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM boletim_dados WHERE email = djespanhol@hotmail.com' at line 1
/boletim/del_email.asp, line 10
--------------------------------------
--------------------------
arquivo deletar_mail.asp
--------------------------
<html><head><title>Boletim Informativo</title><LINK href="../arquivos/style.css" type=text/css rel=stylesheet><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><script>function validar(){var email=document.form.email.value;if (email==""){alert("Você deve digitar o seu E-mail para ser removido")document.form.email.focus()return false}if (email.indexOf('@', 0) == -1 || email.indexOf('.', 0) == -1){ alert("Digite um E-mail válido"); document.form.email.focus() return false }}</script><body topmargin="10"><table width="347" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="30" bgcolor="#F8F8EF"><div align="center" class="notcham">Boletim Informativo</div></td> </tr></table><div align="center"></div><form method="POST" name="form" action="del_email.asp" onsubmit="return validar()"> <table width="347" height="93" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="30" class="texto"> <div align="center">Digite o seu email no campo abaixo para remover:</div></td> </tr> <tr> <td height="33"> <div align="center"><strong><font size="2" face="Verdana"> <input name="email" type="text" class="form2" size="30"> </font></strong></div></td> </tr> <tr> <td height="30"> <div align="center"> <input name="submit" type="submit" class="form2" value="Remover meu E-mail"> </div></td> </tr> </table></form></html>
--------------------------
arquivo del_mail.asp
--------------------------
<!--#include file="conectar.asp"--><%AbreConexao'Recupero os dadosDim emailemail = replace(request.form("email"), "'", "''")deletar = "DELETE * FROM boletim_dados WHERE email = " & email &""Conexao.Execute(deletar)FechaConexao%><html><head><title>Boletim Informativo</title><LINK href="../arquivos/style.css" type=text/css rel=stylesheet><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body topmargin="10"><table width="347" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" bgcolor="#F8F8EF"><div align="center" class="notcham">Boletim Informativo</div></td> </tr></table> <table width="347" height="112" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="19" class="texto"> </td> </tr> <tr> <td height="30" class="texto"> <div align="center">O e-mail <strong><%= email = Request.Form ( "email" ) %><%=email%></strong> foi removido com sucesso.</div></td> </tr> <tr> <td height="33"> <div align="center"><strong><font size="2" face="Verdana"> </font></strong></div></td> </tr> <tr> <td height="30"> <div align="center"> <input name="submit" type="submit" class="form2" value=" Fechar" onClick="javascript:window.close();"> </div></td> </tr></table></form></html>
Carregando comentários...