Thread: Asp Code help
View Single Post
Old 03-21-2003, 08:28 AM   #3 (permalink)
catfish696
Registered User
 
catfish696's Avatar
 
Join Date: Mar 2003
Location: MN
Posts: 5
catfish696 is on a distinguished road
Send a message via AIM to catfish696
fixed it

Actually it was the select statement, it was too general, I fixed it. But now I’m having a problem with another page.

Mind trying to tackle it?

The referring page lists items in a table with check boxes next to them, you select the line items to delete and hit the button, and this is the delete page.

The problem I am having is that it will delete 1 record just fine, but if there are more than 1 records selected for deletion it goes straight to the deleted confirmation page, but doesn’t actually delete anything. Any suggestions?

here is the code

<%
Dim RS, MyConn, SQL

Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "dsn=notreal"
SQL = "DELETE FROM table WHERE ITEM1 = '" & request.form("toDelete") & "'"
Set RS = MyConn.Execute(SQL)

MyConn.Close
Set MyConn = Nothing

%>

I have tried changing the "DELETE FROM..." to "DELETE * FROM..." and all I get is an SQL error
catfish696 is offline   Reply With Quote