Using Coldfusion 8, Coldbox 2.6.3.
Storing query object in session. Session is set asynchronously and attempted to be read from 'instantly' in a popup window to generate excel sheet/csv. Initial error of garbage data in the generated file fixed with 'cflock' on setting/reading session code chunks(session scope). Same session var is set in multiple places to different queries. New error is that the session var is just set to the previous query it was set to and not the one it should be set to. After waiting a few seconds and doing a refresh, session var has correct query.
A Coldfusion exception is generated in CF debugging that a certain query column is not defined - the column names being hardcoded to read from the query in session - which just means that the session var has the wrong query which I confirmed to be the previous query using cfdump.
I wonder why cflock would fix the garbage data problem but not this problem. Thanks.