|
|
|
|
|
| | |
|
Active Server Pages ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Deleting multiple records in SQL DB |
From: |
Charles |
Date: |
12/29/1999 12:42:59 PM |
IP: |
207.144.165.177 |
Thanks for the info it did help!
Now, I have another question. I ended up doing it this way:
<%
Open the database
set conn = server.createobject ("adodb.connection")
conn.open "DSN" , "sa" , "password"
Loop through the form checking for items checked in field DEL
For Each Item in Request.Form("DEL")
Define our variables
Dim itemToDelete, RS, Conn, SQL
Define our SQL command to execute and execute it
SQL = "DELETE FROM Shopping WHERE ShoppingID = " & item & ""
SET RS = Conn.Execute(SQL)
Get next record
Next
Close the database and clear the conn session parameter
Conn.Close
Set Conn = Nothing
%>
Is there anything wrong with doing it this way? I dont expect more than 10 users at a time.
Thanks,
Charles
|
Previous Message
|
|
|
|
|
|
|
|
|
|
|
|