Ciao a tutti e graize per l'aiuto:
questo è l'errore che mi esce quando interrogo il db:
Tipo di errore:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][Driver ODBC Microsoft Access] Errore di sintassi nell'istruzione INSERT INTO.
/test/newsletter/subscribeNewsletter.asp, line 42
Vi posto il listato di codice:
<%@ Language = VBScript %>
<%
Email = request.form("Email")
'Send an email to the bugger to confirm the email address
if len(Email) <> 0 then
'Time to open the database
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * From Newsletter where Email = '"&Email&"'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
'Return error if email already exists
while not rs.eof
if rs("Email") = Email then
output = "Questo indirizzo e-mail è già presente nel database"
blnError = true
end if
rs.moveNext
wend
if not blnError then
SQL = "INSERT INTO Newsletter (Email, Status) values ('"&Email&"', 0)"
SQL = SQL&"VALUES('"&email&"')"
Conn.Execute(SQL)
conn.close
'Compose email message here
Message = "Per confermare l'iscrizione alla Newsletter "&CompanyName&" ("&DomainName&")," &vbCrLf
Message = Message & "clicca semplicemente sul link quì di seguito:" & vbCrLf & "http://"&DomainName&"/newsletter/newsletterConfirmation.asp?email="&Email
Message = Message & vbCrLf & vbCrLf & "Se invece non vuoi partecipare alla nostra newsletter, ingnora questo messaggio." &vbCrLf
Signature = vbCrLf & "Imprtante: Non Rispondere a questa e-mail." & vbCrLf & vbCrLf & "____________________" & vbCrLf
Signature = Signature & CompanyName & vbCrLf & "http://"&DomainName
set newMailObj = server.createObject("CDONTS.NewMail")
newMailObj.BodyFormat = 1
newMailObj.MailFormat = 0
newMailObj.from = "no-reply@"&replace(DomainName, "www.", "")
newMailObj.to = Email
newMailObj.subject = CompanyName & " Conferma Registrazione alla Newsletter"
newMailObj.body = Message & Signature
newMailObj.send
set newMailObj = nothing
output = "Iscrizione Avvenuta
Controlla la tua e-mail, clicca il link in essa presente per confermare l'iscrizione."
end if
end if
%>
Cimi mi può dare una mano, lo ringrazio di cuore.

Rispondi quotando
mancante alla fine dell'istruzione SQL.
