cfselect bind error "is not valid 2D array or serialized query"

CurtinProp used Ask the Experts™
Hi guys,

This is a continuation of the following thread:

The question was answered fine and I really cant see any problems with the source (see below)..

However I'm getting the following error:

"Bind failed for select box [levels], bind value is not a 2D array or valid serialized query"

Any thoughts?

-- page1.cfm --

<cfquery name="qbuildings" datasource="...">
	select bl_id from BL
	where site_id = '1'

<cfform name="muform" preservedata="yes">
<cfselect name="buildings" id="buildings" query="qbuildings" display="bl_id" value="bl_id" />

<cfselect name="levels" id="levels" bind="application.buildings.getBuildingLevels({buildings})" display="fl_id" value="fl_id" />

-- buildings.cfc --

<cfcomponent displayname="buildings" output="no">

  <cffunction name="getBuildingLevels" access="public" returntype="query" output="false">
    <cfargument name="buildingid" required="true" type="any">
    <cfset var qLevels = "">
        <cfquery name="qLevels" datasource="afm_fire">
       		select fl_id
            from afm.fl
			where bl_id = <cfqueryparam  value="#arguments.buildingid#" cfsqltype="cf_sql_varchar">
    <cfreturn qLevels>

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
unfortunately, you can't bind to a cfc stored in application scope. BIND attribute needs a dot-delimited physical path to the cfc on the server.

hmm... or is your cfc actually in a folder named 'application'? that may cause some problems, too, i think...
but try adding cfc: qualifier to the bind attribute:


assumes your buildings.cfc is in /applications subfolder of current page's folder.




your spot on mate.... I had originally defined the cfc in my application scope...

For anyone reading this thread I added the "cfc:" and gave the bind a relative path..... You also have to make sure the access param is set to "remote".

thanks man.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial