<% 'Database Variables dim conn dim ConStr dim rs dim sql 'other variables dim failed dim failmsg sql = "SELECT * FROM Content WHERE ID='"&Request.querystring("ID")&"'" ConStr = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&server.MapPath("items.mdb") set conn=Server.CreateObject("ADODB.Connection") conn.open ConStr set rs = Server.CreateObject("ADODB.RecordSet") rs.Open sql, conn 'get record if not rs.BOF then 'check that there is a record rs.MoveFirst else failed = true failmsg = "That is not a valid item ID" end if %> Delete this item? <% if failed then response.Write(failmsg&"
"&chr(13)) else %>

Delete this item?

<% n = 0 for i = 1 to 3 if rs("FileName"&i) = "No Attachment" then n = n + 1 else response.write("") end if next if n = 3 then response.Write("") end if %>
Are you sure? Once you click on the delete button, that's it, the record and any attached files will be removed from the database, they will no longer be accessible from this server. Just make sure it's what you really want before you do it.
I had a friend once who deleted a record without thinking. We never saw him again. Think before you delete.
 
Record Details
Title<%= rs("Title") %>
Author<%= rs("UserName") %>
Header<%= rs("Header") %>
Item Type<%= rs("Type") %>
Start Date<%= rs("StartDate") %>
End Date<%= rs("ExpiryDate") %>
Files Attached
"&rs("FileName"&i)&"
No attached files.
 
">
 
Back
Main Page
<% end if %>