Skip to main content
Participant
February 10, 2011
Question

cfgridupdate

  • February 10, 2011
  • 2 replies
  • 545 views

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?

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    February 15, 2011

    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#">

    Inspiring
    February 12, 2011

    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: &lt;cfoutput&gt;#myArray#&lt;/cfoutput&gt;

    You need to change your code to reference a string value within the complex object.

    --

    Adam