Dave, >In general, if you can't find a specific function that returns exactly what >you want, your best bet for these sorts of things is to use exception >handling to try something, and see if it works: > ><cftry> > > <cfcollection action="create" name="foo" ...> > > <cfcatch> > ... Collection already exists? > </cfcatch> > ></cftry> > >Of course, if there's any other reason why creating a collection might >fail, >you'd need to account for that.
This actually no longer throws an error--or didn't in the original CFMX 7. However, you can attempt to do a <cfsearch /> on a collection. If it doesn't exist, it'll throw an error. I've found this is the fastest method to detect if a collection exists. Here's a UDF I wrote: http://blog.pengoworks.com/blogger/index.cfm?action=blog:519 -Dan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243196 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54