[thelist] ADO Delete Method

Mark Kamian mhkamian at hotmail.com
Wed Nov 10 18:10:45 CST 2004


OK, I've successsfully reworked my SQL Query into:

DELETE FROM OPENS WHERE OPENS.agt IN (SELECT agt FROM USERS WHERE SOURCE=2)

Thanks anyways!



>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!
>
>_________________________________________________________________
>Don’t just search. Find. Check out the new MSN Search! 
>http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
>--
>
>* * Please support the community that supports you.  * *
>http://evolt.org/help_support_evolt/
>
>For unsubscribe and other options, including the Tip Harvester and archives 
>of thelist go to: http://lists.evolt.org Workers of the Web, evolt !

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the thelist mailing list