WestCoast_BC
asked on
Error querying table in multiple databases
I am trying to query the same table in multiple databases. When my code attempts to query the second database in my list I get the following error:
Datasource DB1 could not be found.
If I change the order in my DSNList my code always fails at the second database.
Datasource DB1 could not be found.
If I change the order in my DSNList my code always fails at the second database.
<cfset DSNList = "db1, db2, db3">
<cfloop list="#DSNList#" index="defDSN" delimiters=",">
<cfoutput>
[#defDSN#]:
</cfoutput>
<CFQUERY NAME="getCategory" DATASOURCE="#defDSN#">
SELECT *
FROM thread_categories
</cfquery>
<br />
</cfloop>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER