vadför får jag: Order är ett reserverat ord i SQL(ingår ju i ORDER BY). Syntax fel i INTO-uttryck?
Feltyp:
Microsoft JET Database Engine (0x80040E14)
Syntaxfel i INSERT INTO-uttryck.
/asp/webshop/test.asp, line 84
strSQL = " INSERT INTO order (fornamn, email)"
strSQL = strSQL & " VALUES('"& Request.Form("fornamn") &"','"& Request.Form("email") &"' "
strSQL = strSQL & ")"Sv: Syntax fel i INTO-uttryck?
Testa med:
<code>
strSQL = "INSERT INTO [order] (namn, epost, adress, postnr)" & vbCrLf & _
"VALUES('"& Replace(Request.Form("namn"), "'", "''") & "'," & vbCrLf & _
" '" & Replace(Request.Form("epost"), "'", "''") & "' ," & vbCrLf & _
" '" & Replace(Request.Form("adress"), "'", "''") & "'," & vbCrLf & _
" '"& Replace(Request.Form("postnr"), "'", "''") & "')"
</code>