Stream Data-Pages in ASP.NET Using GridView and SqlDataReader
1 Comments Published by John Eric Sobrepena on Sep 19, 2009
This is my first blog entry. I am starting this blog to document ideas and most of the time - how these ideas were implemented. This will serve as a note and reminder for me and hopefully it will help other people (such as I.T. professionals) like you. This article is the first of two or three parts.
Let us move on directly to the topic I will be discussing. Say we have a time-consuming SQL query with the following characteristics:
The objective is to be able to respond to the web request as soon as possible by showing some data to the browser while a background thread continues to pull data from the data store. In other words, as soon as there are enough rows available for the first data-page, we can bind that data to the GridView and render it to the client while more data is retrieved and buffered on the background. This strategy is quite common in windows applications, but how can we achieve this in a web application? Here are four simple strategies we will use to achieve this.
Read more »
Let us move on directly to the topic I will be discussing. Say we have a time-consuming SQL query with the following characteristics:
- The time of completion of execution is at T60 (e.g. 60 seconds)
- The time-to-first-record* is at T10 (e.g. 10 seconds)
- The SQL query is already fully optimized
The objective is to be able to respond to the web request as soon as possible by showing some data to the browser while a background thread continues to pull data from the data store. In other words, as soon as there are enough rows available for the first data-page, we can bind that data to the GridView and render it to the client while more data is retrieved and buffered on the background. This strategy is quite common in windows applications, but how can we achieve this in a web application? Here are four simple strategies we will use to achieve this.
Read more »
Labels: AJAX, ASP.NET, asynchronous, background, Buffer, Buffering, C#, Cache, Callbacks, data-pages, GridView, IDataReader, Paging, SqlDataReader, Streaming, threading, Visual Web Express 2008



