954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

sql delete

hi! please help am still new on ASP and am having trouble deleting from a table please help. the code i used is this:

<%

set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLNCLI;Server=THABO-2A88C6501\SQLEXPRESS;Database=customers;User ID=sa;Password=thabo;"
set rs=Server.CreateObject("ADODB.recordset")

if request("Delete")="Delete" then
sql="DELETE * FROM Details WHERE Cust_ID='4567'"
end if%>
<center><form method="post" action="Delete.asp">

<input type="submit" name="Delete" value="Delete">
</form></center>

<%
conn.close
%>


please correct and show me what am doing wrong thanx in advance

PotaZinga
Newbie Poster
16 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

You should do a search before posting because this was answered only a few days ago.

ArtistScope
Junior Poster
150 posts since Jun 2010
Reputation Points: 5
Solved Threads: 14
 

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

conn.Execute sql


code thanx anyways

PotaZinga
Newbie Poster
16 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You