Guest aspflower Posted May 2, 2006 Share Posted May 2, 2006 Sir,I have a created a projt in asp,(in java script)where u have a delete buttons .My problem z whenever i click that button the relevant data is not getting deleted but its getting displayed in the list.I need a solution for deleting that particular record in the asp page that should not affect in the database... Link to comment Share on other sites More sharing options...
aspnetguy Posted May 2, 2006 Share Posted May 2, 2006 Could you post the code you already have...it would be a big help Link to comment Share on other sites More sharing options...
pulpfiction Posted May 2, 2006 Share Posted May 2, 2006 This might be of little help...http://www.webwizguide.com/asp/tutorials/d...om_database.asp Link to comment Share on other sites More sharing options...
Yahweh Posted May 2, 2006 Share Posted May 2, 2006 Sir,I have a created a projt in asp,(in java script)where u have a delete buttons .My problem z whenever i click that button the relevant data is not getting deleted but its getting displayed in the list.I need a solution for deleting that particular record in the asp page that should not affect in the database...<{POST_SNAPBACK}> First, display your records, and be sure when you click the delete button, you pass the record's unique ID as querystring data:Dim Conn, RS, sqlConn = Server.CreateObject("ADODB.Connection")RS = Server.CreateObject("ADODB.RecordSet")sql = "Select * From your_table"Conn.Open YourDSN rs.open sql, Conn, 1, 1, %> <a href="delete.asp?ID=<%=RS("ID")%>">Delete</a> Other field data here<br> <% RS.CloseConn.Close On another page, use this code to delete your record: Dim Conn, RS, sqlSet Conn = Server.CreateObject("ADODB.Connection")sql = "Delete * From your_table WHERE ID = " & request("ID")Conn.Open YourDSNSet RS = Conn.Execute(sql)Conn.Close Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now