[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '* FORM Svarbank WHERE id='.
HjælpJeg skal oprette en side hvor jeg skal have vist alle informationer der ligger i en tabel der hedder Svarbank men det bliver ved med at drille hvem vil hjælpe.
Jeg får denne fejl.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '* FORM Svarbank WHERE id='.
/stv/_Janne/svarbank/vis_data_alt.asp, line 20
Her er mit script:
<% Dim Conn,DSN,strSQL
response.Write "<h2>Vis alle data</h2>"
' Databaseforbindelse - husk at angive sti til din database
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("fpdb/svarbank.mdb")
Conn.Open DSN
strSQL = "SELECT * FORM Svarbank WHERE id= " & Request("id")
Conn.Execute(strSQL)
Set rs = conn.Execute(strSQL)
%>
<table border="0" width="400">
<tr>
<td colspan="3" align="right">
[<a href="default.asp">Til forsiden</a>]
[<a href="ret_i_data.asp?id=<%=rs("id")%>">Ret i Post</a>]
[<a href="adresser.asp">Indtast ny Post</a>]
[<a href="slet_data.asp?id=<%=rs("id")%>">Slet Post</a>]
</td>
<tr>
<td colspan="3"><b>Information om,</b></td>
<%
Id_nr = rs("Id_nr")
Dato = rs("Dato")
Pers1 = rs("Pers")
email = rs("email")
Pers2 = rs("Pers2")
email1 = rs("email1")
Tlf = rs("Tlf")
Spm = rs("Spm")
Svar = rs("Svar")
%>
<tr>
<td width="9"></td>
<td width="128"><b>Nummer</b></td>
<td width="255"><%=Id_nr%></td>
</tr>
<tr>
<td width="9"></td>
<td width="128"><b>Spørger</b></td>
<td width="255"><%=Pers1%></td>
</tr>
<tr>
<td width="9"></td>
<td width="128"><b>E-mail</b></td>
<td width="255"><a href="mailto:<%=email%>"><%=email%></a></td>
</tr>
<tr>
<td width="9"></td>
<td width="128"><b>Svarer</b></td>
<td width="255"><%=Pers2%></td>
</tr>
<tr>
<td width="9"></td>
<td width="128"><b>E-mail</b></td>
<td width="255"><a href="mailto:<%=email1%>"><%=email1%></a></td>
</tr>
<tr>
<td width="9"></td>
<td width="128"><b>Telefon nr.</b></td>
<td width="255"><%=Tlf%></td>
</tr>
<tr>
<td width="9"></td>
<td width="128"><b>Spørgsmål</b></td>
<td width="255"><%=Spm%></td>
</tr>
<tr>
<td width="9"></td>
<td width="128"><b>Svar</b></td>
<td width="255"><%=Svar%></td>
</tr>
<tr>
<td width="9"></td>
<td width="128">Lagt på d.<b><%=Datevalue(dato)%></b></td>
<td width="255"></td>
</tr>
<tr>
<%
response.Write"</table>"
' Luk databaseforbindelse
conn.Close
Set conn = Nothing
%>
</tr>
</table>