I am attempting to use cffunction to query a database and then cfset the
returned variables to a new names. I get the following error when attempting to
access the page.
"Local variable givenname on line 19 must be grouped at the top of the function
body."
Here's my function that appears on my .cfc page:
<cfldap action="query"
name="GetIDS"
start="ou=ple,o=blah.com"
filter="id=#userID#"
attributes="givenname,sn,mail,dbaddress,dbcity,dbstate,dbzipcode,homephone"
server="ds.blah.com" username="uid=asdf,ou=ReadOnly,o=blah.com"
password="password" >
<cfset var givenname = "First_name">
<cfset var sn = "Last_Name">
<cfset var mail = "Addr">
<cfset var dbaddress = "ADDRESS">
<cfset var dbcity = "City">
<cfset var dbstate = "State">
<cfset var dbzipcode = "ZIP">
<cfset var homephone = "PHONE">
<cfreturn GetIDS>
</cffunction>
What am I doing wrong? Is it possible to use cfset inside of a cffunction?
Thanks!
John
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278099
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4