In the old days intentionally throwing a driver error would do it :)

Mark A. Kruger, MCSE, CFG
(402) 408-3733 ext 105
Skype: markakruger
www.cfwebtools.com
www.coldfusionmuse.com
www.necfug.com



-----Original Message-----
From: Andrew Scott [mailto:[email protected]] 
Sent: Sunday, September 19, 2010 11:49 PM
To: cf-talk
Subject: RE: The solution: (was: Re: Is there a way to force lock release on
Access database? (CF9) )


One could always use the Administrator API, and remove that setting from the
admin settings. Whether this lock is changed on the request as easily is
another story. 

Just a thought.

Regards,
Andrew Scott
http://www.andyscott.id.au/



> -----Original Message-----
> From: Mike Kear [mailto:[email protected]]
> Sent: Monday, 20 September 2010 2:41 PM
> To: cf-talk
> Subject: The solution: (was: Re: Is there a way to force lock release on
Access
> database? (CF9) )
> 
> 
> 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.
> 
> 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:337236
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to