PDA

View Full Version : where the error in the code


bmwmpower
04-16-2003, 02:23 PM
i have this error when i make delete for record


Error Type:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/test/sample.asp, line 490
=============================
this is the code for delete

If Not IsEmpty(Request("Delete")) Then
If Not IsEmpty(Request("DeleteLog")) Then
SQL ="DELETE FROM report "
For each item in Request("DeleteLog")
blnWhere = True 'Set where to true
sql = sql & "WHERE "
SQL = sql & "ID= " & item

Next
End If
End If
============================================

ok i will upload the file to tell me where the error

Spudhead
04-16-2003, 05:53 PM
I'm not sure. That's a fairly big chunk of code to poke through.

However:

Why are you opening all those connections at the beginning? You only need one connection object, you can fire off muliple recordset objects against it.

Line 206 - you set the ActiveConnection of objRs to Nothing.
That's probably not going to help.

bmwmpower
04-21-2003, 03:47 PM
i need help why this error