Deleting access db entries?????

Results 1 to 2 of 2

Thread: Deleting access db entries?????

  1. #1
    Join Date
    Dec 1969

    Default Deleting access db entries?????

    I&#039m altering a script for a guestbook which has a page called admin.asp which allows me to delete guestbook entries. The entries are stored on an access db.<BR><BR>The admin.asp page lists all guestbook entries with a checkbox next to it. The name given to this checkbox is "checked". The submit button then takes the info to deleteguest.asp which among other code has the following:<BR><BR>For intLoop = 1 to Request.Form.Item("checked").Count <BR>rsUsers.Filter = 0<BR>Response.write "Entry = " & Request.Form.Item("checked")(intloop)<BR>rsUsers.F ilter = "Entry = " & Request.Form.Item("checked")(intloop)<BR>rsUsers.D elete<BR>Next<BR><BR>rsUsers is the recordset.<BR>This should work, but instead i&#039m getting the following error in IE:<BR><BR>ADODB.Recordset error &#039 800a0bb9&#039 <BR>The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. <BR>/Guest/DeleteGuest.asp, line 30 <BR><BR><BR>Line 30 is:<BR>rsUsers.Filter = "Entry = " & Request.Form.Item("checked")(intloop)<BR>which is the same as above.<BR><BR>What&#039s going wrong?<BR>PLEASE HELP!!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Deleting access db entries?????

    Try this<BR><BR>&#060;input type=checkbox Name="Delete" value=&#060;%=RS("RecordID")%&#062;&#062;<BR>&#060 ;input type=checkbox Name="Delete" value=&#060;%=RS("RecordID")%&#062;&#062;<BR>&#060 ;input type=checkbox Name="Delete" value=&#060;%=RS("RecordID")%&#062;&#062;<BR><BR>< BR>then on the response page <BR><BR>DelVar=Reuwst("Delete")<BR><BR>you would get a value like 1, 3<BR><BR>DelVar=Replace(DelVar, ", ", " Or ID=")<BR><BR>then it would be 1 Or ID= 3<BR>Sql=Delete TableName.* From Table Where RecordId=" & Delvar<BR><BR>your Sql would be<BR>Delete TableName.* From Table Where RecordId= 1 Or ID= 3<BR><BR>Conn.Execute Sql<BR><BR>done<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts