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
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
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
. 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
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
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
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
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
8 matches
Mail list logo