Friday, December 12, 2008

Coldfusion uses inner db connection when nesting cfquery

When you implement a nested cfquery to different datasources, ColdFusion will use the inner connection for both queries. Symptoms are that tables can not be found: ERROR: relation "mapdef" does not exist

<cfquery datasource="vista_monitoring2" name="x">
select * from mapdef limit 1
<cfquery datasource="vista_wintermanagement_r" name="y">
select * from rides limit 1
</cfquery>
</cfquery>

No comments: