Make sure the name you gave your datasource in the CF Administrator is the
same as the name you are using in the "name" attribute of your cfquery tag.

CF Appears to think there is no datasource with the name you are trying to
use.

-----Original Message-----
From: Steven Sprouse [mailto:sspro...@ccboe.com] 
Sent: Thursday, March 11, 2010 3:39 PM
To: cf-talk
Subject: Re: Two CFQUERY statements?


You'll have to excuse me, I'm still sort of a CF novice so I'm not too
familiar with how to use CFTRANSACTION.

What I was doing was just putting two separate CFQUERY statements at the
head of my document, each with a different name attribute and different data
sources. When I did my cfoutput of the second cfquery, that's when I got my
error.

The error was "Error Executing Database Query. [Macromedia][SequeLink JDBC
Driver][ODBC Socket][DataDirect][ODBC SequeLink driver][SequeLink Server]The
specified data source is not defined." But I'm not sure that is very helpful
to you.

If one of the databases was converted into a table and placed into the other
database, I'd have no problem with this, but for some reason I'm getting
tripped up with the different data sources.

Thanks for any help you can offer.

> You can happily query multiple databases within the same request; 
> what
> you can't do is query multiple databases within a single transaction.
> So as long as your CFQUERY tags don't share a CFTRANSACTION block you
> should be fine.
> 
> Can you post the actual error message?
> 
> cheers,
> barneyb
> 
> On Thu, Mar 11, 2010 at 12:26 PM, Steven Sprouse <sspro...@ccboe.com> 
> wrote:
> >
> > I have someone who has two separate databases and they want me to 
> write a Web form generating option menus from both databases.
> >
> > I have set up both as separate data sources in my Coldfusion 
> administrator and have included one cfquery at the head of my document 
> generating a list of locations. It's working fine. When I try to query 
> the second database and do a cfoutput for another option menu, I get 
> errors.
> >
> > I seem to remember that it might not be possible to have two 
> separate cfquery statements in the same document. Is this correct? If 
> so, how would I go about achieving my desired result?
> >
> > 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331642
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to