Lots of people have suggested similar things - cause an error when
running a query on the access database, which will break the lock.
Maureen also suggested deleting the ldb file.   That's the file that
creates the lock and it cant be deleted.    It gets deleted when the
system lets go of the

This is old news, I'm afraid.  It dates back to CF5.  Since the MX
era, that no longer works.

However I have found that  in CF9 the lock remains on the access
database only as long as the datasource is being used.   When the
process using the database is completed, the lock is removed
automatically.    The reason I never noticed this before is that  I
have been trying to open a zip file,  copy the file to the \db folder
where it can be used as a datasource, update it, then put the access
database file back into the zip file and delete the file i was working
on.   I was trying to do it all in the same page.

Now it seems  I have to put the process into two separate steps. I
have to allow ColdFusion to disconnect from the datasource first,
THEN attempt to delete the mdb file.    I have been experimenting with
CFThread as a way of accomplishing this but its a bit obscure to me
yet.   More study required.    Or alternatively,  two separate .cfm
files completely, with the second one being triggered separately to
the first.

If anyone has any suggestions as to how i should do this, I'd be most
grateful.

Currently I'm thinking one of the following :

[A] A single .cfm file calling separate threads.  This has the
advantage of the whole process in a single file, but will only work if
the datasource is released after that thread completes processing.
[B] A single .cfm file, calling the actions that require the database
in a custom tag.   But again, that will only work if the datasource is
released after the tag completes processing.
[C] two separate .cfm files,  and one triggered after the first
completes processing.   Perhaps by a third .cfm file controlling both
of the others.

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 Sun, Sep 19, 2010 at 2:52 AM, Kris Jones <kris.jon...@verizon.net> wrote:
>
> It's not elegant, but I've found that throwing an error on the
> datasource works for releasing them. Try a query against the dsn for a
> table that doesn't exist.
>
> Cheers,
> Kris
>
>> Try deleting the .ldb file.
>>
>> On Wed, Sep 15, 2010 at 8:58 AM, Mike Kear <afpwebwo...@gmail.com> wrote:
>>>
>>> I have to make an Access database containing updated data from my
>>> SQLServer database,  which can be downloaded by my users by FTP.    I
>>> can make the Access database a coldfusion datasource,  and fill it up
>>> with the data I want,  but I need to release it from the lock
>>> ColdFusion puts on it.  Does anyone have a technique for releasing
>>> that lock nowdays?   (I'm using CF9 Enter
>
> 

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

Reply via email to