Geeks With Blogs
Saif Khan { I am Saif } "Knowledge is power, information is free, share it!"


I was looking for a way to delete many objects (selected in a GridView) in one query instead of iterating each ActiveRecord and executing the .Destroy(). I tried the following but it didn’t work


I used this instead

Dim items As New ArrayList() 
For Each Item Selected in the GridView 
    items.Add(the id of the record I want to delete)
Dim query As New SubSonic.Query(Table.Schema) 
query.QueryType = SubSonic.QueryType.Delete 
query.IN("ColumnName", list) 


Posted on Friday, April 29, 2011 7:32 AM | Back to top

Comments on this post: SubSonic 2.2 Multiple Deletes

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © saifkhan | Powered by: