Steve,

Are you sure your calling code isn't setting the returned result to the request scope somewhere? I can't see anything in your function that would set the result to the request scope.

What about something like trusted cache retaining a previous version of this function?



Steve Bryant wrote:
Wondering if anyone has seen this or know of a solution.

Running on CFMX 6.1.

I am working on a bug-tracking application. It automatically captures errors along with selected data at the time of the error (request scope, for example).

In order to capture the data, I use cfwddx to put it into the database. This works fine.

When I pull the data out, I use cfwddx again to convert the data back to its original state. This seems to work fine.

Except that (at least in the case of "request" scope - haven't tested others) the contents of that scope get overwritten with the data that I pull back into a variable via cfwddx.

I am var-ing my variables in the method.

Anyone have any ideas on how to prevent this? (code snippet below).

If this would be better for another list, just let me know.

Thanks,

Steve Bryant
918-449-9440
Bryant Web Consulting LLC
http://www.BryantWebConsulting.com/
http://steve.coldfusionjournal.com/


<cffunction name="getErrorVariables" returntype="query" access="public" output="no" hint="I return all of the ErrorVariables.">
        <cfargument name="ErrorID" type="string" required="yes">

        <cfset var qErrorVariables = 0>
        <cfset var instance = StructNew()>

        <cfquery name="qErrorVariables" datasource="#variables.datasource#">
        SELECT  VariableID,ErrorID,VariableName,Data
        FROM    bugErrorVariables
        WHERE   ErrorID = <cfqueryparam value="#arguments.ErrorID#" cfsqltype="CF_SQL_INTEGER">
        </cfquery>

        <cfoutput query="qErrorVariables">
                <cfif IsWDDX(Data)>
                        <cfset instance.in = Duplicate(qErrorVariables.Data[CurrentRow])>
                        <cfwddx action="" input="#instance.in#" output="instance.out">
                        <cfset QuerySetCell(qErrorVariables, "Data", instance.out, CurrentRow)>
                </cfif>
        </cfoutput>

        <cfreturn qErrorVariables>
</cffunction>



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]





--


Aria Media Sagl
CP 234
6934 Bioggio
Switzerland
www.aria-media.com


Reply via email to