In some of our apps (in Application.cfm), we copy our datasource variable
into the Request scope (which is then available to the CFC):

<!--- copy dsn to Request scope --->
<cfset Request.dsn = Application.dsn>

It sounds like from your description that this would work for you.  If it
doesn't, are there more details you can share?  Maybe a simple test case
that fails?

Kyle

Kyle Shiflett
elliptIQ Inc.
--
http://www.neighborware.com
America's Leading Community Network Software

-----Original Message-----
From: Dave Wilson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 7:31 AM
To: CF-Linux
Subject: CROSSPOST: Is this a bug? datasource as variable does not work in
cfc

Hi all,

I've been porting over some flash remoting code to work with a new mysql
version of our original MS SQL database and came across some rather strange
behaviour. Basically I've discovered that declaring the datasource parameter
in a query within the cfc, doesn't work.

Typically I set the application.dsn value in my Application.cfm file and
then anywhere within my application I simply use
datasource=#application.dsn# for my queries (like most ppl do).

Doing this within a cfc - service for flash remoting - breaks the query and
consequently the flash app depending on the service. Debugging does throw an
error stating the variable does not exist, but I've tried declaring the
variable by other means and basically have found the datasource parameter
simply cannot accept a variable whilst within a cfcomponent in a cfc.

Environment:

CFMX 6.1, RH7.2, Apache 2.043


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to