I've never used <cfldap>, so i'm not sure you can alias the columns
that way (maybe someone who has more familiarity with it can chime
in).
what i was suggesting was a query of queries. assuming the <cfldap>
returns a standard CF query object (again, an assumption), i figured
you could just alias the columns in the query of queries.
<cfquery name="myQoQ" dbtype="query">
SELECT
givenName AS First_Name,
sn AS Last_name,
(etc)
FROM
GETIDS
</cfquery>
then <cfreturn myQoQ> instead of the original LDAP query.
On 5/16/07, John P <[EMAIL PROTECTED]> wrote:
> Thanks for the help Charlie,
>
> I've used aliasing to change my collumn names in this way:
>
> <cffunction name="listUsers" access="remote" returnType="query" output="true">
> <cfargument name="userID" required="yes">
> <cfset var getIDS = "">
>
>
> <cfldap action="query"
> name="GetIDS"
> start="ou=ple,o=blah.com"
> filter="id=#userID#"
> attributes="givenname as First_name,sn as Last_name, mail
> as email,dbaddress as Address,dbcity as city,dbstate as state,dbzipcode as
> zipcode,homephone as phone"
> server="ds.blah.com" username="uid=asdf,ou=ReadOnly,o=blah.com"
> password="password"
>
> <cfreturn GetIDS>
>
> </cffunction>
>
> But I am unable to output the new table data associated with the new column
> names after I invoke the component.
>
> Cfdump does work and displays the collumn names as DBADDRESS AS ADDRESS etc.
>
> Any idea what I am doing wrong? Thanks.
>
>
>
>
>
>
>
> >On 5/15/07, John P <[EMAIL PROTECTED]> wrote:
> >> Here's the function on my .cfc page:
> >
> >The function isn't resetting anything.
> >
> >Your block of <cfset> tags is simply setting some variables that are
> >local to the function. They are not in any way related to the LDAP
> >query (not the way you have the code written). You could pull all of
> >those <cfset> tags out, and you'd get the same result.
> >
> >If you're trying to rename the columns, you could do a query of
> >queries (query the LDAP query) and alias the column names the way you
> >want them to appear.
> >
> >Also, scope that #userID# variable as #arguments.userID# :)
> >
> >
> >--
> >Charlie Griefer
> >
> >================================================
> >"...All the world shall be your enemy, Prince with a Thousand Enemies,
> >and whenever they catch you, they will kill you. But first they must catch
> >you, digger, listener, runner, prince with a swift warning.
> >Be cunning and full of tricks and your people shall never be destroyed."
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 &
Flex 2
Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278347
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4