<code> <code> får fel på den här raden Nästa gång kan du ju berätta vilken databasmotor du använder. Vet inte om MySQL stödjer underfråger.delete top...
<%
SQL = "Delete top " & request.form("tabort") & " from gastbok where tillid ='" & session("id") & "' order by id desc"
rs.Open SQL, Connect,1,2
%>
</code>
Den här koden fungerar inte så jag undrar om nån vet hur jag ska göra... antar att ni ser vadd et är jag vill....Sv: delete top...
Dim strCount
strCount = "" & request.form("tabort")
If IsNumeric(strCount) Then
strSQL = "DELETE FROM gastbok" & vbCrLf & _
"WHERE Id IN (SELECT TOP " & strCount & " Id" & vbCrLf & _
" FROM gastbok" & vbCrLf & _
" WHERE tillid ='" & session("id") & "'" & vbCrLf & _
" ORDER BY Id DESC)"
Connect.Execute strSQL
Else
Response.Write "Ange antal poster du vill ta bort!"
End If
</code>Sv: delete top...
<code>
WHERE Id IN (SELECT TOP " & strCount & " Id
</code>
anväder en mySQL databas
<code>
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[TCX][MyODBC]You have an error in your SQL syntax near 'SELECT TOP 3 id FROM gastbok WHERE tillid ='1' ORDER BY Id DESC)' at line 2
/jenova/community/gastbok/delgbinlaggs.asp, line 15
</code>Sv: delete top...