943,199 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Marked Solved
  • Views: 272
  • ASP RSS
Jul 19th, 2010
0

sql delete

Expand Post »
hi! please help am still new on ASP and am having trouble deleting from a table please help. the code i used is this:
asp Syntax (Toggle Plain Text)
  1.  
  2.  
  3. <%
  4.  
  5. set conn=Server.CreateObject("ADODB.Connection")
  6. conn.Open "Provider=SQLNCLI;Server=THABO-2A88C6501\SQLEXPRESS;Database=customers;User ID=sa;Password=thabo;"
  7. set rs=Server.CreateObject("ADODB.recordset")
  8.  
  9. if request("Delete")="Delete" then
  10. sql="DELETE * FROM Details WHERE Cust_ID='4567'"
  11. end if%>
  12. <center><form method="post" action="Delete.asp">
  13.  
  14. <input type="submit" name="Delete" value="Delete">
  15. </form></center>
  16.  
  17. <%
  18. conn.close
  19. %>

please correct and show me what am doing wrong thanx in advance
Last edited by PotaZinga; Jul 19th, 2010 at 10:37 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
PotaZinga is offline Offline
16 posts
since Jul 2010
Jul 19th, 2010
0
Re: sql delete
You should do a search before posting because this was answered only a few days ago.
Reputation Points: 5
Solved Threads: 14
Junior Poster
ArtistScope is offline Offline
146 posts
since Jun 2010
Jul 20th, 2010
0
Re: sql delete
oh ya i saw that just i dint know where or y my code wasn't working and dint really give me any errors.but i did find what my problem was just a few min after i posted. i had left out the
asp Syntax (Toggle Plain Text)
  1. conn.Execute sql
code thanx anyways
Reputation Points: 10
Solved Threads: 0
Newbie Poster
PotaZinga is offline Offline
16 posts
since Jul 2010

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Help with Flash
Next Thread in ASP Forum Timeline: how to build membership page?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC