Quantcast
Viewing all articles
Browse latest Browse all 21760

cfloop problem after upgrading from CF8 to CF10

I was recently forced due to company policy to upgrade from CF8 to CF10.  When I did so, a number of things naturally broke.

 

Specifically, I have some cfloop code that is now throwing a "Complex object types cannot be converted to simple values" where it didn't before.  This is driving me mad.  Must be something simple I'm missing.

 

The gist of it is that I have a multi-select listbox (sorted with some javascript I found online) passing a comma-delimited list of numbers as the "FORM.list" value to the loop. 

 

Here is the code:

 

    <cfif isDefined("FORM.list")>      <cfloop list="#FORM.list#" delimiters="," index="i">           <cfquery name="somename" datasource="#datasource#">                UPDATE STATEMENT (some query code)          WHERE some_id = #i#             </cfquery>      </cfloop>      </cfif> 

 

When one item is selected in the form list, the code works fine.  When I multi-select two or more items from the multi-select box, it throws:

 

"Complex object types cannot be converted to simple values." 

 

All that's in the passed form values are numbers: e.g. "123456,234532".

 

Does anyone know what's going on so I can stop pulling my hair out?

 

Thanks!


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>