strange behavior of cfset
This problem has befuddled me for a couple of days now and I cannot figure it out. First I'll say that my set up is ColdFusion 9, SQL Server 2008, and IIS 7.0. Let me also say that I have no control over my development environment which is a major hindrance but that is the case. Whenever I get an error with my ColdFusion code I simply get a generic IIS "500 Internal Server Error". The admin probably has suppressed more meaningful error messages that ColdFusion would give me. So for the time being this is the environment I have to work with and can't do anything about it.
So with this in mind here is the issue. Look at the pseudo code below which resembles the issue I am having:
<cfset x = query1.field1>
<cfset y = query2.field1>
<cfset z = x - y>
<td><CFOUTPUT>#DollarFormat(x)#</CFOUTPUT></td>
<td><CFOUTPUT>#DollarFormat(y)#</CFOUTPUT></td>
This is pretty straight-forward code that should easily work. Take into account that the two queries being referred to are both defined further up in the code (which I haven't included). However for some unknown reason the third line (setting variable "z") breaks the code. If I comment this line out the page will at least run without an error. The values of variable "x" and "y" display without a problem.Also take into account I have NOT tried to DISPLAY variable "z" yet, I am simply trying to set the value for it which ColdFusion seems to object to for some reason. Also variables "x" and "y" are integers and are not null values. Also this entire statement is within a "cfloop" so it should run these lines 3 times (which it does and it outputs the correct values).
Does anyone have any idea what might cause the 3rd line to give an error? I'm somewhat new to ColdFusion so maybe its something obvious (though I've used similiar code before without a problem). If you need me to elaborate more I can though I'm not sure how helpful that would be. Any help is much appreciated
