R
rbrowning1958
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
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