[thelist] ADO Delete Method
Mark Kamian
mhkamian at hotmail.com
Wed Nov 10 16:52:15 CST 2004
Hi all,
I'm attempting to use the Delete Method's optional 'adAffectGroup' argument
in the following code to delete all records in a recordset, but am getting
this error:
Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
listall.asp, line 16
I should also include the fact that the SQL Query, when run directly in the
DB, is fine and produces the intended records.
If I use only the .Delete method, without the optional adAffectGroup
argument, it works fine but only deletes the first record and not all of
them.
I've looked into the .Filter property, but haven't been able to get it right
yet...
<%
'open connection code omitted for brevity...
Set rsEdit = Server.CreateObject("ADODB.Recordset")
If Request.QueryString("delete") = "OPENS" Then
cmdTemp.CommandText = "SELECT OPENS.*, USERS.agt FROM OPENS INNER JOIN USERS
ON USERS.agt = OPENS.agt WHERE USERS.SOURCE = 2"
rsEdit.Open cmdTemp, , 1, 3
rsEdit.Delete adAffectGroup '(line 16)
ElseIf
yadayada...
End If
%>
Thank you in advance for any assistance!
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
More information about the thelist
mailing list