473,324 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Gridview paging and SELECT with no Where clause

Hello,

I wonder whether someone can explain to me how data is fetched from a
database server when using ASP.NET 2.0's gridview with paging enabled?
My SQL DataSource has a simple "select * from customers" - no where
clause. Using SQL Server's Profiler I can see this same statement is
executed each time I move between pages. Am I right that the ASP
engine on the server is just returning the records required for that
particular page in the grid?

For example - if the grid wants to display relative records 10 thru 19
(say page 2) it still runs select * causing the server to retrieve the
entire table, but only records 10 thru 19 are returned to the
browser?

If this is correct, then after page 2 is rendered to the browser, if a
second user changes record 20 (part of what would be the first user's
3rd page), when the first user requests the third page (records 20
thru 29), then this first user will see the second user's change to
record number 20?

Thanks in advance,

Ray
Mar 17 '08 #1
1 2275
you are correct. the default paging is bind to a dataset, and display record
n thru n + page size. if your table is very large, this is not a good
approach. you want to handle the paging in your code.

-- bruce (sqlwork.com)
"rbrowning1958" wrote:
Hello,

I wonder whether someone can explain to me how data is fetched from a
database server when using ASP.NET 2.0's gridview with paging enabled?
My SQL DataSource has a simple "select * from customers" - no where
clause. Using SQL Server's Profiler I can see this same statement is
executed each time I move between pages. Am I right that the ASP
engine on the server is just returning the records required for that
particular page in the grid?

For example - if the grid wants to display relative records 10 thru 19
(say page 2) it still runs select * causing the server to retrieve the
entire table, but only records 10 thru 19 are returned to the
browser?

If this is correct, then after page 2 is rendered to the browser, if a
second user changes record 20 (part of what would be the first user's
3rd page), when the first user requests the third page (records 20
thru 29), then this first user will see the second user's change to
record number 20?

Thanks in advance,

Ray
Mar 17 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ck388 | last post by:
For some reason when I enable the callback feature of the gridview I still get a page refresh, that is it seems like there is a postback that occurs, not a callback which is just supposed to update...
2
by: asad | last post by:
Hello friends, i am designing a ASP.NET page where i want to use custom paging bcoz data is too heavy so pls tell me how can i use custom paging in ASP.NET Thanks
1
by: Henry Habermacher [MVP Access] | last post by:
Environment: VS2005, ASP.Net 2.0, SQLServer 2000, VB.Net, IIS6 I use a GridView Control which is based on a SQLDataSource. The datasource is based on a Select statement and is filtered by the...
4
by: Bishop | last post by:
I have a number of simple select queries that a user needs to be able to execute and display the data on the screen in a gridview. My thought was that I could use a Gridview set to dymanically...
0
by: John Smith | last post by:
ASP.Net 2.0 / C# / IIS 6 I have 2 pages. The master page consists of a tabbed menu created using the Menu and MultiView controls. Something like this: ...
8
by: rbg | last post by:
I did use query plans to find out more. ( Please see the thread BELOW) I have a question on this, if someone can help me with that it will be great. In my SQL query that selects data from table,...
2
by: antonyliu2002 | last post by:
I've been googling for some time, and could not find the solution to this problem. I am testing the paging feature of gridview. I have a very simple web form on which the user can select a few...
0
by: Don Miller | last post by:
Here is an example of what I believe is a bug in ASP.NET 2.0 GridView paging without postbacks (or at least not documented how to fix it). Once the GridView is displayed, clicking on any of the...
4
by: Don Miller | last post by:
This is a repost of a reproducible problem/bug with GridView with dynamic SQL and binding. Is there a better ASP.NET newsgroup I should post to where MS techs or MVPs take an interest in such...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.