MyQuery.getString("columnName") works because you actually have a java object of type jdbc.recordset

or evaluate("myquery.columnName") works too.

Pat



On 5/22/06, Mark Mandel <[EMAIL PROTECTED]> wrote:

Hey all,

This seems like a stupid question, but I can't seem to figure it

If I have a query, called 'myQuery' I can do:

(1)
<cfloop query="myQuery">
   myQuery.column
</loop>

and it will output fine.

I can do:
(2)
<cfset column = "myColumn"/>
<cfloop query="myQuery">
   myQuery[column][myQuery.currentRow]
</loop>

and it will output fine

But if I do:
(3)
<cfset column = "myColumn"/>
<cfloop query="myQuery">
   myQuery[column]
</loop>

I get the error:
Complex object types cannot be converted to simple values.

Is option (2) the only way to handle dynamic column names?

I had thought option 3 would work.. but it doesn't seem to...

Help?

Mark

--
E: [EMAIL PROTECTED]
W: www.compoundtheory.com
ICQ: 3094740


Reply via email to