Microsoft JET Database Engine (0x80040E14) Syntax error in FROM clause. HELP ME PLEASE

15/04/2007 - 13:01 por Orgil | Informe spam
I have a MS Access database named VBQUIZ.mdb. The MDB file has 3
tables which are Option, Question and Quiz.
My code in VBScript is here :

Code
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("/_mysite1/VBQUIZ.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "Select * from Option", conn

do until rs.EOF
for each x in rs.Fields
Response.Write(x.name)
Response.Write(" = ")
Response.Write(x.value & "<br />")
next
Response.Write("<br />")
rs.MoveNext
loop

rs.close
conn.close


What is going on, tell me please!!!
 

Leer las respuestas

#1 Dani Castillo
15/04/2007 - 16:26 | Informe spam
Maybe table "option" is the problem, it could be a reserved word :S , try to
rename it and change from sql clause :S


"Orgil" escribio en el mensaje
news:
I have a MS Access database named VBQUIZ.mdb. The MDB file has 3
tables which are Option, Question and Quiz.
My code in VBScript is here :

Code
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("/_mysite1/VBQUIZ.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "Select * from Option", conn

do until rs.EOF
for each x in rs.Fields
Response.Write(x.name)
Response.Write(" = ")
Response.Write(x.value & "<br />")
next
Response.Write("<br />")
rs.MoveNext
loop

rs.close
conn.close


What is going on, tell me please!!!

Preguntas similares