954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Loading Message during DB Query

I have an query output with 200+ records in it which i am displaying 100 at a time. and i am using cfFlush to display a wait message while it s loading. (which i cant figure out how to get rid of after its loaded)

my question is (and i'm assuming there isnt) but is there a way to know the progress of the query to display a progress bar... or is there a way to cfflush the output so that it will begin populating while its still querying? it is taking about a minute for the page to display and i am trying to stop users from reloading the page in mid query.

<strong>Failed to add HTML header.</strong>  
ColdFusion was unable to add the header you specified to the output stream. This is probably because you have already used a cfflush tag in your template or buffered output is turned off.  
  
The error occurred in C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\DMS\report\estimate_excel.cfm: line 1264
 
1262 : 
1263 : 
1264 : <cfheader name="Content-Disposition" value="inline; filename=ise_#HUserID#.xls"> 
1265 : <cfcontent type="application/vnd.ms-excel" file="#pathToOutFile#">
1266 :
SimonSiew
Newbie Poster
1 post since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

You could use cfajaxproxy and use javascript to show/hide a waiting gif image. Look up that tag at Adobe, it is a great tag. With cfflush you can only use it once I believe because the headers for the web page has already been sent over to the browser.

cfwebdeveloper
Junior Poster in Training
78 posts since May 2011
Reputation Points: 19
Solved Threads: 8
 
is there a way to know the progress of the query to display a progress bar...

No. Queries don't return partial progress. You'll only know when they're complete.or is there a way to cfflush the output so that it will begin populating while its still querying?

Definitely not for file downloads. The old hack was to display a fake progress image/div when the download starts. Then hide it when the download's finished. The newer tags like cfprogressbar are a spin on that old idea. http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec19562-7fdf.html

arrgh
Posting Whiz
381 posts since Dec 2008
Reputation Points: 32
Solved Threads: 47
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You