you need to move: <cfset stcAccess = StructNew()>
to just below your cfarguments and change it to: <cfset var stcAccess = StructNew()> --Ferg Russel Madere wrote: > Here is what I ended up doing: > > <cffunction name="UserRights" output="true" returntype="any"> > <cfargument name="stgAppID" required="true" type="string"> > <cfargument name="stgUserID" required="true" type="string"> > <cfargument name="stgModuleName" required="true" type="string"> > > <cfstoredproc datasource="SecuritySQLServer" > procedure="USP_UserRights" > > <cfprocparam type="in" value="#stgUserID#" > cfsqltype="cf_sql_varchar"> > <cfprocparam type="in" value="#stgAppID#" > cfsqltype="cf_sql_varchar"> > <cfprocparam type="in" value="#stgModuleName#" > cfsqltype="cf_sql_varchar"> > > <cfprocresult name="qGetRights" resultset="1"> > </cfstoredproc> > > <cfset stcAccess = StructNew()> > <cfset stcAccess.WithAccess = Iif(qGetRights.WithAccess EQ 1, > TRUE, FALSE)> > <cfset stcAccess.WithReadOnly = Iif(qGetRights.Mod_ReadOnly EQ > 1, TRUE, FALSE)> > <cfset stcAccess.WithAdd = Iif(qGetRights.Mod_Add EQ 1, TRUE, > FALSE)> > <cfset stcAccess.WithModify = Iif(qGetRights.Mod_Modify EQ 1, > TRUE, FALSE)> > <cfset stcAccess.WithDelete = Iif(qGetRights.Mod_Delete EQ 1, > TRUE, FALSE)> > <cfset stcAccess.IsAdmin = Iif(qGetRights.Administrator EQ 1, > TRUE, FALSE)> > > <cfreturn stcAccess> > </cffunction> > > --- > > Calling: > > <cfset stcWithAccess = UserRights("CSI_NEW", "#CGI.LOGON_USER#", "CSI > Main")> > > I need to clean it up a little, like for when no records are returned. > But this seems to work. Tom and Dave, thanks a bunch. > > Russel Madere > Webmaster > 504.832.9835 > SunShine Pages by EATEL > www.sunshinepages.com > > > -----Original Message----- > From: Russel Madere [mailto:[EMAIL PROTECTED] > Sent: Friday, June 09, 2006 10:18 AM > To: CF-Talk > Subject: RE: ColdFusion UDFs and passing variables by reference > > Never mind. I figured that little bit out. I can just pass it out of > the UDF. > > Russel Madere > Webmaster > 504.832.9835 > SunShine Pages by EATEL > www.sunshinepages.com > > > -----Original Message----- > From: Russel Madere [mailto:[EMAIL PROTECTED] > Sent: Friday, June 09, 2006 10:03 AM > To: CF-Talk > Subject: RE: ColdFusion UDFs and passing variables by reference > > All I have to say is Doh! I'm not thinking well this morning. > > Do I have to instantiate the structure outside of the UDF or can I just > create it inside and pass it out. > > Russel Madere > Webmaster > 504.832.9835 > SunShine Pages by EATEL > www.sunshinepages.com > > -----Original Message----- > From: Tom Chiverton [mailto:[EMAIL PROTECTED] > Sent: Friday, June 09, 2006 9:57 AM > To: CF-Talk > Subject: Re: ColdFusion UDFs and passing variables by reference > > On Friday 09 June 2006 15:12, Russel Madere wrote: > >> Can I use the CALLER scope to return multiple variables from the UDF? >> > > Yes, but why not just return a structure or object ? > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243045 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