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")%> </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")%> </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")%> <%=rs("SubmitTF")%> </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")%> </font></TD>
</TR>
<TR>
<TD align=left colspn=2> </TD>
<TD align=left height=25 colspn=2> </TD>
</TR>
<% rs.MoveNext
wend
con.Close
Set con = Nothing
Set rs = Nothing
%>
********************************************************
Thanks in advance.
Rich
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")%> </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")%> </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")%> <%=rs("SubmitTF")%> </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")%> </font></TD>
</TR>
<TR>
<TD align=left colspn=2> </TD>
<TD align=left height=25 colspn=2> </TD>
</TR>
<% rs.MoveNext
wend
con.Close
Set con = Nothing
Set rs = Nothing
%>
********************************************************
Thanks in advance.
Rich