Does it really need to do this at runtime? I think this could also be
done by a true/false flag in the initialization of the application.


-------------------------------------------------------------
Hugo Ahlenius                  E-Mail: [EMAIL PROTECTED]
Project Officer                Phone:            +46 8 230460
UNEP GRID-Arendal              Fax:              +46 8 230441
Stockholm Office               Mobile:         +46 733 467111
                               WWW:       http://www.grida.no
-------------------------------------------------------------



| -----Original Message-----
| From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]
| Sent: Tuesday, January 13, 2004 14:39
| To: CF-Talk
| Subject: Determining Database Type
|
| I'm working on an application where I need to provide support
| for both MySQL and MSSQL databases.  This is because our
| devel and production environments are both running MySQL 4.x
| on Windows but our staging/code share server is running MySQL
| 3.23 on Linux.  They're working on upgrading but because of
| the control panel they run it's not a possibility at the moment.
|
| So what I've done is created a MS SQL version of the
| database.  In the entire site there are only two queries that
| have to be changed for the different databases (MSSQL
| concatenates differently than MySQL).  Other than that
| everything else is playing nicely together.
|
| What I'm wondering, though, is if there is a way for me to
| run a query in my application.cfm to determine the version of
| the database I'm running.  At the moment I'm exploring using
| a CFCatch around a specific MySQL query (select version()),
| but does anyone have any better ideas of how to go about this?
|
| FWIW this is all running on Windows servers using CFMX 6.0 and 6.1.
|
| Thanks!
| Hatton
|
| ---
| Outgoing mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.559 / Virus Database: 351 - Release Date: 1/7/2004
|
|
|
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to