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.  
<cfset DSNList = "db1, db2, db3">

<cfloop list="#DSNList#" index="defDSN" delimiters=",">
	<CFQUERY NAME="getCategory" DATASOURCE="#defDSN#">
		SELECT      *
		FROM        thread_categories
	<br />

Open in new window

Who is Participating?
js_vaughanConnect With a Mentor Commented:
You will need to remove those spaces in the list.
WestCoast_BCAuthor Commented:
Thank you!  I wish I had figured that out an hour ago.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.