That would work too, Dave.   I think!    The second page would contain
the delete functionality?   Seems to make sense.

The problem is to force ColdFusion to let go of the datasource
completely before attempting to delete the MDB file.  I have found
that using CFThread wont work, because ColdFusion still hangs on to
the datasource even after the .cfthread accessing it has completed.

Later:  ...

I tried Dave Watts' suggestion of a CFLOCATION to a second page, and
it works on my development environment.    PROGRESS!  Thank you Dave.

So the lesson to learn:

[A] ColdFusion 9 retains a lock on an Access database for the entire
time a page that requires it is active.  Once the page finishes
processing, the lock is automatically released on the access database.
   PROVISO:  you have to have set up the datasouce in the
CFAdministrator as "-- Maintain connections across client requests."
set to Off (unchecked).   I have not been doing any work on this with
that option On, so I can only assume it wont work with that option
set.

[B] causing an error, by running a query on a non-existent table wont
release the lock on the database post-CF5.  That was the advice way
back in the old days, but now it wont work.  In fact it'll be
counter-productive because it will cause the connection to the dsn to
persist even longer and therefore retain the lock longer.


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month



On Mon, Sep 20, 2010 at 1:40 PM, Dave Watts <[email protected]> wrote:
>
> Why not have one page that redirects to another using CFLOCATION?
>
> Dave Watts, CTO, Fig Leaf Software
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337222
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to