View Single Post
  #2 (permalink)  
Old 10-19-03, 01:44 AM
Shane Shane is offline
Coding Addict
 
Join Date: Jun 2003
Location: Maryland, US
Posts: 268
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by pnqoma
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
%>
In your DB, what data type if your ID column?
__________________
Shane Bauer
Microsoft Certified Professional (MCP) - ASP.NET
ASP/ASP.net, C#, VB/VB.NET, PHP, Perl, SQL
Reply With Quote