Guest Luis Posted October 29, 2003 Report Share Posted October 29, 2003 Fala ai galera tranquilo, estou tentando cadastrar info de um txt num db contudo ta dando o seguinte erro:Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error in query expression '_neemiaslima@uol.com.br'. /email/index.asp, line 48 alguém ai poderia me ajudar?Dim conex,db_path,path_do_arquivo,nome_do_arquivopath_do_arquivo = "e:\home\interno\dados\"nome_do_arquivo = "emails.txt"cont = 0db_path = "e:\home\interno\dados\email.mdb"set conex = Server.CreateObject("ADODB.Connection")conex.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & db_pathconex.open'Use o objeto FileSystem para abrir o arquivoSet fs = CreateObject("Scripting.FileSystemObject")Set thisfile = fs.OpenTextFile(path_do_arquivo & nome_do_arquivo, 1, 0)do while thisfile.AtEndOfStream=false emaill = thisfile.Readline emaill = Trim(emaill)strSQL = "SELECT * FROM tblMailingList order by Mail_ID"Set bds = Conex.Execute(strSQL)do while not bds.eofemaildb = Trim(bds("email"))if emaill = emaildb thenchave = "1"end ifbds.movenextloopif chave = "1" thenresponse.write cont&" - "&emaill &" já estava cadastrado.<br>"else strUserCode = Left(emaill,2) & (9876989856 * CInt((RND * 32000) + 100))SQLStmt = "INSERT INTO tblMailingList (Email,ID_Code)"SQLStmt = SQLStmt & "VALUES (" & emaillSQLStmt = SQLStmt & "," & strUserCode & ")"set incluir = Conex.Execute(SQLStmt)response.write cont&" - "&emaill & " Cadastrado com sucesso ! <br>"cont = cont + 1end ifchave = "0"loopconex.Closeset conex=nothingset dbs=nothingset incluir=nothingthisfile.Closeset thisfile=nothingset fs=nothing Quote Link to comment Share on other sites More sharing options...
0 ursolouco Posted October 29, 2003 Report Share Posted October 29, 2003 Hum...SQLStmt = "INSERT INTO tblMailingList (Email,ID_Code)"SQLStmt = SQLStmt & "VALUES (" & emaillSQLStmt = SQLStmt & "," & strUserCode & ")" Acho que é assim:<% SQLStmt = "INSERT INTO tblMailingList (Email,ID_Code) VALUES ('"& emaill &"';'"& strUserCode &"');"Vê ai...Abraços!!! Quote Link to comment Share on other sites More sharing options...
0 Guest Guest Posted October 29, 2003 Report Share Posted October 29, 2003 continua dando erroMicrosoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error in query expression ''_neemiaslima@uol.com.br';'_n223990375954368''. /email/index.asp, line 47 Quote Link to comment Share on other sites More sharing options...
Question
Guest Luis
Fala ai galera tranquilo, estou tentando cadastrar info de um txt num db contudo ta dando o seguinte erro:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in query expression '_neemiaslima@uol.com.br'.
/email/index.asp, line 48
alguém ai poderia me ajudar?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.