> ok... wat i need is to hav multiple DB connection in a query 
> statement..
> 
> for example.. i need to hav a joint query from a oracle 
> database and a ms sql database..
> 
> can i actually do this..?
> 
> <cfquery name =eg1 datasource="oracle.dsn, mssql.dsn">
> .
> .
> </cfquery>
> 
> ?? or must it be query within a query?
> 
> <cfquery name =eg1 datasource="oracle.dsn">
> .
> .
>     <cfquery name =eg2 datasource="mssql.dsn">
> .
> .
>     .</cfquery>
> </cfquery>

Neither of those will work. You can only query one datasource within a
single CFQUERY block, although if that datasource is configured to see other
datasources, your single CFQUERY could contain code that references those
other datasources. I think you can set up SQL Server's Distributed
Transaction Coordinator to allow connections to Oracle databases, but I
haven't tried it myself. For what it's worth, I've never seen any database
application development environment which would allow what you're
referencing in your first example.

In the second case, when people talk about "query-a-query", they mean the
new CF 5 functionality which allows you to run one or more CFQUERYs against
a real database, then reference those recordsets within another CFQUERY,
rather than a nesting of CFQUERY tags, which won't work under any
circumstances.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to