Hi all..
I'm simply trying to delete the top most records of my database tabel.. I first get the ID's of the top records, but then I dunno what to do next... :-(
Here's my complete (TESTING-) page, while
testing I include the "recordTotalFlash"
var in the URL when calling the asp file:
==============================================
<%
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
Dim DBConn, strDB, strInsertSQL, chatname, messagetxt, messagetime
strDB = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("data/messages.mdb")
recordTotalFlash=Request("recordstotal")
if recordTotalFlash>6 then
response.write "&Above_6"
strDELETESQL = "SELECT TOP 3 * FROM Messages ORDER BY id DESC"
Set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open strDB
DBConn.execute strDELETESQL
DBConn.delete
DBConn.close
Set DBConn=Nothing
end if
%>
Hope someone can help me....
thnx
Roel
I'm simply trying to delete the top most records of my database tabel.. I first get the ID's of the top records, but then I dunno what to do next... :-(
Here's my complete (TESTING-) page, while
testing I include the "recordTotalFlash"
var in the URL when calling the asp file:
==============================================
<%
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
Dim DBConn, strDB, strInsertSQL, chatname, messagetxt, messagetime
strDB = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("data/messages.mdb")
recordTotalFlash=Request("recordstotal")
if recordTotalFlash>6 then
response.write "&Above_6"
strDELETESQL = "SELECT TOP 3 * FROM Messages ORDER BY id DESC"
Set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open strDB
DBConn.execute strDELETESQL
DBConn.delete
DBConn.close
Set DBConn=Nothing
end if
%>
Hope someone can help me....
thnx
Roel