I would guess there would be a configuration file, probably in XML, that
stores the "chosen" DB platform. The createObject() method would then
dynamically call the chosen CFC at runtime.
Something like:
<cfswitch expression="#variables.config.daoType#">
<cfcase value="mssql">
<cfset objDAO = createObject("component", "userDAO_MSSQL")>
</cfcase>
<cfcase value="oracle">
<cfset objDAO = createObject("component", "userDAO_Oracle")>
</cfcase>
</cfswitch>
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Kerry
Sent: Thursday, November 18, 2004 4:22 AM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Process for Updating Database Records
Joe,
Just read the article on the link, interesting stuff, but the example
scenario you have used is making the app db independant, but then you
use this code in your front end .cfm
<cfset userDAO = createObject("component",
"UserDAO_MSSQL") />
Now your front end is still hardcoded for MSSQL? And the only way (other
than doing a massive find/replace) to shift the entire app to another DB
easily is by modifying the userDAO_MSSQL.cfc so that it no longer is
MSSQL?
Kerry
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at
[EMAIL PROTECTED]