Click here to Skip to main content
15,887,302 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a problem here, i'm trying to create a asp page where my recordset have a link to a id present in the DB which can be brought to my other page which will delete the record base on the ID

EG::

AL(id=1)
OIL(id=2)

when the user click on AL, the page can capture the value 1 search the ADO n delete record
similarly is user click on OIL, the page capture the value 2 search the ASO n delete record

i've got the part for deleting done but i've no clue on how to create the link.. any help?? :doh: :confused: :doh:
Posted

create two pages,one is show the record,other one is delete your data where you link to the record

eg:
show.page
<br />
<html><br />
<head>..........</head><br />
<br />
<body><br />
Dim sql <br />
sql="select id,title from table"<br />
set rs=conn.execute(sql)//conn is connection object<br />
For i=1 to rs.count<br />
response.write("<a href='delete.asp?ID="&rs('id')&"'>"&rs('title')&"</a><br>")<br />
Next<br />
%><br />
</body><br />
<br />
</html><br />


delete.asp
<br />
<%<br />
Dim id<br />
id=request('ID')<br />
conn.execute("delete * from table where ID="&ID)<br />
%>
 
Share this answer
 
<br />
<br />
<script></script><br />
<br />
<br />
<br />
<br />
<br />
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900