Skip to main content
July 31, 2007
Question

CFC Not Returning Struct

  • July 31, 2007
  • 3 replies
  • 298 views
Hi,

I have been using CFC's a while now so it's nothing really that new to me. I have returned structures from CFC's before with no problems at all - and on this same server I use with other applications.

However, this one application just isn't returning the struct from the function my page invokes. The function contains an SQL query, which funnily enough processes just fine, yet nothing in the form of a structure is returned,

I don't get any errors of any sort and the code I am using has been used before. So, I guess my questions is, would anyone know why this wouldn't return what I am wanting it to? It's really very confusing. (see code attached if it helps).

Many thanks in advance for tackling this puzzling issue!!

Mikey.
    This topic has been closed for replies.

    3 replies

    July 31, 2007
    Ahh yes, you are both completley correct and now I feel very stupid, haha!

    Thanks for your help - God damn it, I love these forums!

    Thanks guys and girls :)
    Inspiring
    July 31, 2007
    In addition to what Adam said, it's always a good idea to use the var keyword when initilizing variables inside a function.
    Inspiring
    July 31, 2007
    > <cfinvoke component="cfc.system" method="positionTop">

    Where's your returnvariable attribute?

    --
    Adam