Bob's Creedy's idea of breaking the lock with a failed SQL statement (within a CFQUERY against the intended datasource) is the simplest way to break the lock. If you can ask the admin to uncheck the "maintain db connections" for the datasource, it would be easier for you (and believe it or not, there are MM KB articles that suggest it's actually better for all kinds of reasons to leave it unchecked).
 
What Bob Keleher mentioned below as a tag is instead a function, so you could do a <cfset tmp=CFUSION_DBCONNECTIONS_FLUSH()>. The nasty with that is that is that it breaks the connections for ALL datasources on the server. If the admin doesn't fix the setting for your datasource, let him/her know that you could solve it this latter way. If s/he doesn't wake up and smell *that* coffee, you might want to think about the quality of your administrator. :-) Sadly, they're often pretty clueless about CF matters.
 
/charlie
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mike
Sent: Wednesday, February 20, 2002 11:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFTALKTor] Database Locks

I don't own the machine.  It is a virtual server I am not sure that I have access to this feature in the CF administrator.
 
Regarding the tag. How do I use this tag?
----- Original Message -----
Sent: Wednesday, February 20, 2002 11:39 AM
Subject: Re: [CFTALKTor] Database Locks

Mike,
 
A couple of approaches:
 
1. in the CF administrator, uncheck 'maintain database connections' for this datasource (should be done for all Access databases anyway , see http://www.macromedia.com/v1/handlers/index.cfm?ID=1540&Method=Full)
 
 
2. use the undocumented tag CFUSION_DBCONNECTIONS_FLUSH(). - disconnects all currently connected CF datasources (won't affect connections currently being used).
 
Bob
 
----- Original Message -----
From: Mike
Sent: Wednesday, February 20, 2002 10:54 AM
Subject: [CFTALKTor] Database Locks

Hello All,
 
I have a question regarding a daily process that is starting to cause us some issues with the way our ISP handles our database connection.
 
We have a program that creates an access database overnight. This database is then sent FTP to our ISP where it over writes the database for a website that allows one of our clients to view data which is contained in the data base.  This is fine if nobody has accessed the website in the last little while the database is over written no problem.  The issue I have is when a person views a webpage a 9:00 am and I want to over write the database at 9:15 there is a lock on the database.
 
I guess I am looking for a way to import and modify data in the database without actually overwriting the database.
 
Does anyone know how to do this in Coldfusion?
 
thanks
 
Mike

Reply via email to