SQL = "Delete top" & bort & " from guestbook where rkod = " & Session("kod") & " order by id desc" Du kan nog inte ha order i en delete-sats... Såhär får du gör i sådana fall:Delete problem
rs.Open SQL, Connect,1,2
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'order'.
Man måste ju kunna välja mer exakt vilka inlägg som ska bort?Sv: Delete problem
SQL = "DELETE FROM guestbook WHERE id IN(SELECT top " & bort & " id FROM guestbook WHERE rkod = " & Session("kod") & " ORDER BY id DESC)"
Connect.Execute SQL
/Johan