[thelist] CF: Determining which DB used.

Joshua Olson joshua at alphashop.net
Wed Sep 12 09:38:21 CDT 2001

Why is this not a good idea?  What harm can come if the query is a
non-destructive select?  Does CF have some locking issues we need to know


----- Original Message -----
From: "Raymond Camden" <jedimaster at macromedia.com>
Subject: RE: [thelist] CF: Determining which DB used.

: > Raymond is right (of course), you should be able to write your app in
: > such a manner that it is portable, but if you must know which
: > database
: > you are using, then use cftry/cfcatch around two queries - one which
: > works in MS SQL only, and one which works in MySQL only,
: > whichever one
: > doesn't fail is the database in force, so set a variable
: > based on that.
: >
: I would strongly urge you NOT to do this. CFTRY/CFCATCH is a good idea
: in general, but using it like this, where you KNOW an error is going to
: happen is not a good idea. CFTRY/CFCATCH should be used when you
: _believe_ an error _could_ occur. I f you _know_ an error will occur,
: then you should not just let it stand.
: Although, shoot, I believe Spectra does something like this, so I can't
: always say that I practice what I preach.
: Just my two cents. :)
: =======================================================================
: Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

More information about the thelist mailing list