Add record delete function to an Access Database List - Help Please

R

Rich

I have a page that list all records in an access table. I would like to add
a delete record function to the list to delete selected records. Here is my
current code:

*********************************************************
<%
Dim strDB, con
Dim rs

strDB = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
Server.MapPath("ques_comm.mdb") & ";"

Set con = CreateObject("ADODB.Connection")
con.Open strDB
Set rs = CreateObject("ADODB.Recordset")
rs.CursorLocation =3

rs.Open "select * from questions ORDER BY usernumber DESC", con
WHILE NOT rs.EOF %>
<TR>
<TD width=25 rowspan="3" align=left valign="middle"
bgColor=#000000><div align="center"><span
class="style1"><%=rs("usernumber")%>&nbsp;</span></div></td>

<TD align=left height=25 bgColor=#e7e7de width=103><strong><font
size="2">Name:</font></strong></td>
<td width="697" bgColor=#e7e7de><font
size="2"><%=rs("UserName")%>&nbsp;</font></td> <td width="3"></TD>
</TR>
<TR>
<TD align=left height=25 bgColor=#e7e7de width=103><strong><font
size="2">Time
Submitted:</font></strong></td>
<td bgColor=#e7e7de><font
size="2"><%=rs("SubmitDT")%>&nbsp;&nbsp;<%=rs("SubmitTF")%>&nbsp;</font></TD>
</TR>
<TR>
<TD align=left height=25 bgColor=#e7e7de width=103><strong><font
size="2">Question:</font></strong></td>
<td bgColor=#e7e7de><font size="2"><%=rs("Comments")%>&nbsp;</font></TD>
</TR>
<TR>
<TD align=left colspn=2>&nbsp;</TD>
<TD align=left height=25 colspn=2>&nbsp;&nbsp;</TD>
</TR>
<% rs.MoveNext
wend


con.Close
Set con = Nothing
Set rs = Nothing
%>

********************************************************

Thanks in advance.
Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top