"Do not directly refer to external variables (i.e.:
session/application variables) inside a CFC. When in doubt, preserve
encapsulation. The one exception is when building facades, especially
for web services/flash remoting, in which case ALL references to
shared scope variables should be encapsulated within the facade. This
means, for instance, passing in the dsn instead of referring to
application.dsn when doing database queries."

Bottom line is pass your DSN into the CFC as an argument instead of
calling it directly from the application scope.

Thanks,
Joe Kelly

On 12/22/05, Chris Gomez <[EMAIL PROTECTED]> wrote:
> that's not the case here. both datasource's use a application level variable
> (ie. datasource="#application.dsn#"). I've never seen this
> problem before and neither have my co-workers.
>
>
> On 12/22/05, David Livingston <[EMAIL PROTECTED]> wrote:
> > It means that you have wrapped a cftransaction around several cfquery's
> that have different datasources. This is not allowed when you use
> cftransaction. All of your queries must use the same datasource inside of a
> cftransaction tag.
> >
> >
> > Dave
> >
> >
> >
> >
> >
> >
> >
> >
> > On Dec 22, 2005, at 3:59 PM, Chris Gomez wrote:
> >
> >
> > I'm working on a newsletter form. all the data is supposed to be saved to
> a db. I'm using cftransaction for the queries. But, I keep getting the
> following error:
> >
> > Data source xxxxx verification failed. The root cause was that:
> java.sql.SQLException: Datasource names for all the database tags within
> CFTRANSACTION must be the same.
> > The error occurred on line 4.I restarted the server and tried again. The
> problem happens when there is a failure in the cftransaction.
> >
> > The only way I've found so far to work around the error is to restart the
> cf services.
> > "
> > Any one have any ideas?
> >
> > Chris
> >
> > btw, this is using cfmx 6.1
> >
> >
> > _______________________________________________
> > Reply to DFWCFUG:
> >   [email protected]
> > Subscribe/Unsubscribe:
> >   http://lists1.safesecureweb.com/mailman/listinfo/list
> > List Archives:
> >   http://lists1.safesecureweb.com/mailman/private/list
> >   http://www.mail-archive.com/list%40list.dfwcfug.org/
>
> >   http://www.mail-archive.com/list%40dfwcfug.org/
> > DFWCFUG Sponsors:
> >   www.HostMySite.com
> >   www.teksystems.com/
> >
> > _______________________________________________
> > Reply to DFWCFUG:
> >  [email protected]
> > Subscribe/Unsubscribe:
> >  http://lists1.safesecureweb.com/mailman/listinfo/list
> > List Archives:
> >   http://lists1.safesecureweb.com/mailman/private/list
> >   http://www.mail-archive.com/list%40list.dfwcfug.org/
> >  http://www.mail-archive.com/list%40dfwcfug.org/
> > DFWCFUG Sponsors:
> >  www.HostMySite.com
> >   www.teksystems.com/
> >
> >
> >
>
>
> _______________________________________________
> Reply to DFWCFUG:
>   [email protected]
> Subscribe/Unsubscribe:
>   http://lists1.safesecureweb.com/mailman/listinfo/list
> List Archives:
>   http://lists1.safesecureweb.com/mailman/private/list
>   http://www.mail-archive.com/list%40list.dfwcfug.org/
>   http://www.mail-archive.com/list%40dfwcfug.org/
> DFWCFUG Sponsors:
>   www.HostMySite.com
>   www.teksystems.com/
>
>
>

_______________________________________________
Reply to DFWCFUG:
  [email protected]
Subscribe/Unsubscribe:
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
  http://lists1.safesecureweb.com/mailman/private/list
  http://www.mail-archive.com/list%40list.dfwcfug.org/
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
  www.HostMySite.com
  www.teksystems.com/

Reply via email to