I posted this on the newbie list and didn't get much of a response so I'm 
trying here. 

The goal is to take the ldap response and move it from a query object into a 
structure. I'm searching on a primary key so I know I'll only get 0 or 1 
responses.

My code says this:
<cfldap action="QUERY" attributes="uid,displayName" name="ldap" scope="SUBTREE" 
start="o=University of Minnesota, c=US" filter="(&(cn=*#x500ID#*))" 
server="ldap.umn.edu" port="389" >

<cfloop list="#ldap.ColumnList#" index="column">
        <cfset thisColumn="#column#">
        <cfset args["#thisColumn#"]=ldap["#thisColumn#"] />
        <cfoutput>#args[thisColumn]#</cfoutput> <!--- for debugging --->
</cfloop>

Which gives me this error: "Complex object types cannot be converted to simple 
values."

And I said "huh, I didn't expect that to be an object" So I asked a friend of 
mine and he suggested adding the "##" and maybe putting the column in the 
variable name because he found CF to be a bit buggy in situations like these. 
So I tried:

<cfloop list="#ldap.ColumnList#" index="column">
        <cfset thisColumn="#column#">
        <cfset args["#thisColumn#"]=ldap["#thisColumn#"] />
        <cfoutput>#args[thisColumn]#</cfoutput> <!--- for debugging --->
</cfloop>

I get the same error. So I say "fine be that way" and I try this:

<cfloop list="#ldap.ColumnList#" index="column">
        <cfset thisColumn="#column#">
        <cfset args["#thisColumn#"]=ldap["#ldap[thisColumn.value]#"] />
        <cfoutput>#args[thisColumn]#</cfoutput> <!--- for debugging --->
</cfloop>


Then the error is: "You have attempted to dereference a scalar variable of type 
class java.lang.String as a structure with members."

Which (seems to me) to be a direct contradiction of the previous error. 
How do I make this work?

Thanks in advance
Joelle Tegwen


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238603
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to