<p>I have an ASP page which will query records from a DB Table and do some processing and then Render an HTML table in the browser.My table has more than 16000 rows in it. When i am running the prigram with select top 2500 StudId,StudName from StudentsTbl, It is working fine.But when i am Using select  "StudId,StudName from StudentsTbl",It is not showing any out put. I am using Response.flush() after every 50 records in the while loop.Can any one tell me how to solve this ? Thanks in advance</p>

<hr>

<p>Actaully I would create an Excel file from this ASP page by adding Response..ContentType = "application/vnd.ms-excel" Thats y i need to generate the all data one time</p>

Based on your description of the problem, I'm betting that you're using IE as your test browser. The Response.Flush()
is
outputting HTML, but it will not display right away because IE doesn't know how to render a table incrementally. Instead, IE waits for the entire table to output before it draws it to the browser window. Your script isn't the problem, IE is.
With that being said, I want to point out that your design is fundamentally flawed. Think about your script from a usability perspective: there is no sane reason why you need to output 16000 rows of data all at once.
Page your recordset in SQL
, or limit the recordset to first 1000 rows using a TOP clause.