PC Review


Reply
Thread Tools Rate Thread

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

 
 
Rich@NeedsHelp.com
Guest
Posts: n/a
 
      13th Aug 2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DELETE Record in Database shapper Microsoft Access Queries 2 12th Oct 2006 01:48 PM
How can I delete database in the Open Recent Database list =?Utf-8?B?R2Vhcg==?= Microsoft Access 8 26th Jul 2006 06:43 AM
unable to delete a record in an Access database. =?Utf-8?B?UmFnaW5nQ2hlZg==?= Microsoft Access Forms 2 16th Feb 2006 05:46 PM
Firstly I am sorry if I have mis-posted this.I want to arrangethat a database makes a call over ISDN; collects the data returned, storesit and moves on to the next record.I appreciate that this is not strictlyspeaking the function of a database but I Scotty Microsoft Access Getting Started 0 1st Jun 2005 12:00 AM
delete record from ms access database Phi Microsoft VB .NET 3 17th Sep 2003 03:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:19 PM.