Copy link to clipboard
Copied
hi everybody
i am new coldfusion
i use cfgrid and cfgridupdate and try to insert , update and search with cfgrid
but i always come across same error "Complex object types cannot be converted to simple values"
what is that mean?what should i do?
Copy link to clipboard
Copied
The error means you're trying to use something like a struct, array, query or object in a way that one con only use a simple (read: something that will automatically cast to a string).
EG: <cfoutput>#myArray#</cfoutput>
You need to change your code to reference a string value within the complex object.
--
Adam
Copy link to clipboard
Copied
Chances are that you have put pound signs(#) where you shouldn't have. Check each occurrence of #.
For example, make sure you have
<cfgrid query = "myQuery">
and not
<cfgrid query = "#myQuery#">.
Also, <cfgridupdate grid = "myGridName" dataSource = "myDatasourceName">
and not
<cfgridupdate grid = "#myGridName#" dataSource = "#myDatasourceName#">