Anything to do with not explicitly declaring Data?
Total guess.
From: Steve Bryant <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: [CFCDev] Bizarre cfwddx data behavior
Date: Fri, 21 Apr 2006 13:02:03 -0500
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="WDDX2CFML" 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]
_________________________________________________________________
New year, new job there's more than 100,00 jobs at SEEK
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau&_t=752315885&_r=Jan05_tagline&_m=EXT
----------------------------------------------------------
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]