I'm not sure of the specifics of your tables, but is it possible to delete it all in one query instead of a loop? Just looking at your query it seems like the following would be possible:
<cfoutput>Deleting Orphans...<br/></cfoutput> <cfflush> <cfset orphanList = arrayToList(aOrphan)/> <cfquery name="qDelete" datasource="#variables.dsn#"> DELETE FROM table WHERE id IN(#orphanList#) </cfquery> <cfoutput>Orphans Deleted.</cfoutput> It would certainly save your processing time and server resources. HTH, Jon On Mar 6, 2007, at 2:56 PM, b. van kerckhoven wrote: > I am creating a large coldfusion database-script which deletes > thousands of rows from a table. > > As this script takes a while, I would like to give some visual > feedback to the user runnig the script. > > My idea is to temporarly show the IDs that are being deleted while > I am looping the array. > > <cfloop from="1" to="#ArrayLen(aOrphan)#" index="i"> > <cfquery [...]> > DELETE > FROM table > WHERE ID = '#aOrphan[i]#' > </cfquery> > </cfloop> > > Using CFFLUSH, I know how to display the ids incrementally, but > this gives a list which is much too long. > > Is there a way to show just temporary results? (in this case: only > the ID which is actually BEING deleted) > > any help is appreciated... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271781 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

