Koden nedan vill ej funka mot db, ger fel: " sidan kan ej visas" Skriv istället: Gav detta felmeddelande: Request.Form("ID2") har inget värde. Kontroller namnet på det du skickar och att det är ifyllt.Delete
Läs och skriv rättigheter satta.
<%
ID1=Request.Form("ID2")
Set Connect=Server.CreateObject("ADODB.connection")
Connect.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("db/Forms.mdb") & ";"
Set RecSet=Server.CreateObject("ADODB.Recordset")
SQL="select * From mob Where ID=" & ID1 & ""
RecSet.open SQL,connect,
RecSet.Delete
RecSet.Close
Response.redirect"visa.asp"
%>Sv: Delete
<code>
<%
ID1=Request.Form("ID2")
strSQL = "DELETE FROM mob WHERE ID=" & ID1
Set Connect=Server.CreateObject("ADODB.connection")
Connect.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("db/Forms.mdb") & ";"
Connect.Execute strSQL
Connect.Close
Set Connect = Nothing
Response.redirect"visa.asp"
%>
</code>Sv: Delete
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'ID='. Sv: Delete