deleting records f

Results 1 to 2 of 2

Thread: deleting records f

  1. #1
    Join Date
    Dec 1969

    Default deleting records f

    Plz..look into this:<BR><BR>For I = LBound(array_res) To UBound(array_res)<BR> response.write array_res(I) & "<BR>" <BR>Next <BR><BR>Above will display the items 3<BR> 8<BR> 11 <BR>(these are the item id&#039;s,getting from the previous page) <BR><BR>I want to delete the records from the database which are having the above item id&#039;s.Can any one help me out?

  2. #2
    Join Date
    Dec 1969

    Default RE: deleting records f

    Instead of placing id&#039;s in array put them in and string like this :<BR>strID = "(3,8,11)"<BR><BR>strSQL = "Delete from [table] where [ID_field] IN (" & strID & ")"<BR><BR>db.execute strSQL<BR><BR>This is an *untested* example. Would nice to hear if it worked or not.<BR><BR>Lars

Posting Permissions

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