If a collection exists?

2006-06-12 Thread Johnny Le
Hi, Is there a way to find out if a verity collection exists in CFMX7? It doesn't seem to have a function like collectionExists() or something in the admin API either. If you know of a way, please let me know. Thank you. Johnny

RE: If a collection exists?

2006-06-12 Thread Dave Watts
Is there a way to find out if a verity collection exists in CFMX7? It doesn't seem to have a function like collectionExists() or something in the admin API either. If you know of a way, please let me know. In general, if you can't find a specific function that returns exactly what you

Re: If a collection exists?

2006-06-12 Thread Raymond Camden
cfcollection action=list It will return all collections. Although I've heard this can be a slow operation. You will want to cache the result. On 6/12/06, Johnny Le [EMAIL PROTECTED] wrote: Hi, Is there a way to find out if a verity collection exists in CFMX7? It doesn't seem to have

RE: If a collection exists?

2006-06-12 Thread Dan G. Switzer, II
. 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

Re: Detecting if a Verity Collection Exists in CFMX7...

2006-01-13 Thread Pete Ruckelshaus
It would be a hack, but check to see if the named collection's directory exists in your collection repository? You could also do something like do a cfcolleciton action=list in your application.cfc's onApplicationStart and dump the query structure into the application scope, then do a QoQ when

Detecting if a Verity Collection Exists in CFMX7...

2006-01-12 Thread Dan G. Switzer, II
I'm need to detect if a collection exists and if it doesn't, then I need to create the collection. In previous versions of CF, if you performed the cfcollection action=create / on a collection it would throw an error. This meant you could just wrap the code in a cftry and than use a cfcatch

Re: Detecting if a Verity Collection Exists in CFMX7...

2006-01-12 Thread John Beynon
admin API perhaps? john. On 1/12/06, Dan G. Switzer, II [EMAIL PROTECTED] wrote: I'm need to detect if a collection exists and if it doesn't, then I need to create the collection. In previous versions of CF, if you performed the cfcollection action=create / on a collection it would throw

RE: Detecting if a Verity Collection Exists in CFMX7...

2006-01-12 Thread Dan G. Switzer, II
admin API perhaps? It seems as if the admin may use the cfcollection action=list / command. I've got 64 collections on my box and this tag takes like 20 seconds to run. It takes forever for the admin page to load. I looked on CFLIB.org for an existing UDF and found one, but it uses the