I have tried calling the functions like this:
                        <cfscript>
                                updateUser(valueUseList, fieldUseList,
form.u1id);
                        </cfscript>
                        <cfscript>
                                updateUser(valueUseList, fieldUseList,
form.u1id);
                        </cfscript>

The second time it will throw the error that the function is undefined, if I
comment out the first call, the second call works just fine.

Here is the actual function:
<cffunction name="updateUser">
        <cfargument name="valueUseList" required="true" type="string">
        <cfargument name="fieldUseList" required="true" type="string">  
        <cfargument name="userId" required="true" type="numeric">
<cfif listlen(fielduselist, "|") gt 0>
                <cfquery name="updateUser" datasource="xxx">
                Update myTable set
                <cfloop from="1" to="#listLen(fieldUseList, "|")#"
index="i">
                        <cfoutput>
                                #listgetat(fieldUseList,i, "|" )# =
<cfqueryparam value="#listgetat(valueUseList,i, "|")#"
cfsqltype="cf_sql_varchar">
                                <cfif listLen(fieldUseList, "|") gt
i>,</cfif>
                        </cfoutput>
                        </cfloop>
                where tableId = <cfoutput>'#userid#'</cfoutput>
                </cfquery>
        <cfelse>
                No data given to update user
<cfoutput>#userId#</cfoutput>...
        </cfif>
        <cfreturn>
</cffunction>




        
Daniel Baughman

-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 09, 2006 10:39 AM
To: CF-Talk
Subject: Re: Calling the same UDF twice..


Can you show us the real code?

On 6/9/06, Daniel Baughman <[EMAIL PROTECTED]> wrote:
> Anyone ever seen a situation like this:
>
> You define a function (some arbitrary function)
>
> <cffunction name="fun1">
>                 HI
> </cffunction>
>
>
> And then can't call it twice in a row?
>
> <cfset fun1()>
> <cfset fun1()>
>
> The second time it says that fun1 is not defined, but if you comment out
the
> first call the second runs fine..
>
>
> If anyone has seen this, or is interested in how to recreate, let me know.
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243062
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