View Single Post
  #1 (permalink)  
Old 10-14-03, 12:04 PM
pnqoma pnqoma is offline
New Member
 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
deleting a message from forum

guys plz help, my delete code doesn't work.i have a delete button on the message display board, whereby a msg is supposed to be deleted on the click of the button.Any suggestions??here's my code

Dim Conn, ConnString


set ConnString = server.createobject("adodb.connection")
conn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("forum1.mdb")&";"

'Create the Connection object
connString.open (conn)


if request("action") = "delete" then

sql = "DELETE* FROM messages WHERE id = '" & request("id")&"'"
Connstring.execute(sql)

Response.Write("<h1>The message has been deleted.</font><br>Back to <a href='forumlist.asp'>Forum</h1>")

Connstring.Close
end if
%>
Reply With Quote