if using CF 4.5.x, why not use:

<CFSET temp=CFUSION_DISABLE_DBCONNECTIONS("DSN", 1)>

to release the DSN, and:

<CFSET temp=CFUSION_DISABLE_DBCONNECTIONS("DSN", 0)>

to re-enable it.

just replace DSN with your actual DSN.


-----Original Message-----
From: Stephen Moretti [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 7:45 AM
To: CF-Talk
Subject: RE: the dbl devil


Just as an aside...
Its not actually your application that's holding your database open.  By
default, ODBC is set to "maintain connections".  This is a good and a bad
thing.  Good because it is more efficient to maintain a connection to the
database than to re-make the connection each time you query, insert or
update any of your database tables.  Bad because it means that its difficult
to update your database, but, as Chris says, as long as you are using CF
4.5.x then you can use the cfusion_dbconnections_flush()function.

One thing to say about that function - Use it sparingly....  The function
will flush _all_ database connections. This means that not only will
connections to your database, but everyone else's connections too.  So
potentially you could upset all the other people hosted on the same server
as you, if you use it too often and affect the performance of their
applications.

If you're on a dedicated server and have access to the CF Administrator,
then you can also flush DB connections from the "Verify Data Source" menu
item.

Regards

Stephen
PS. Does anyone know if you can specify a datasource name as an attribute of
cfusion_dbconnections_flush(), so that it will release only the named
datasource?


> -----Original Message-----
> From: Chris Maloney [mailto:[EMAIL PROTECTED]]
> Sent: 11 May 2001 14:48
> To: CF-Talk
> Subject: RE: the dbl devil
>
>
> Megan,
> Provided you are using CF4.5.x you should be able to use the
> cfusion_dbconnections_flush() function to release the database.
> You do need
> to make sure that from the time you release the connection to the time you
> delete the database or replace it that no database accesses are done,
> otherwise the database will again be locked.
>
> The use of 'date' as a field name is a pretty common mistake, it would be
> nice if Access provided warnings about this when you create a database but
> it does not.
>
> Chris
>
> -----Original Message-----
> From: megan sherman [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 11, 2001 8:27 AM
> To: CF-Talk
> Subject: the dbl devil
>
>
> Hi all,
> I'm using Access for my database. Sometimes when I need to make changes
> to the database on the server there is a .dbl file in the directory. I
> can't delete it, and it won't let me upload the database. A couple days
> ago someone on this list said to create a query calling a table that
> doesn't exist. I did that. Got the error on the screen, but the devilish
> dbl was still there. I talked to my cf host and he said, "Your code is
> holding your database too long..put in your code a time to release the
> database after so many minutes." Does anyone know what he was talking
> about?
>      Also, thanks for your assistance on my syntax error when inserting
> date. I was thrown off because cfinsert and cfupdate worked fine. But
> all went awry when I tried to use insert in a query in a cfloop. So
> changing the field name from "date" to "classdate" did the trick.
> Thanks!
> Megan
>
>
>
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to