473,670 Members | 2,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Paging Advice Needed

Dear Group

A while ago I've asked how paging is possible and have read the articles on
aspfaq.com. Great work, esp. the speed comparison of all the different
techniques. Thank you to everyone who has responded to my post. Somewhow
Google didn't let me reply to the thread!

All of the methods described work perfectly fine until I'm trying to
implement a WHERE or ORDER BY DESC on a particular field. E.g. Create all
pages but sort on a date field DESC doesn't start with the lowest date on
the first page and the highest date on the last page but all dates mixed up.

As a workaround I'm at first using a cursor to populate a temporary table
e.g. SELECT * FROM MyTable WHERE MyField1 = Condition ORDER BY MyField2
which only contains the data I would like to use to create the pages. I'm
using a cursor since I read that a normal SELECT to poulate the temporary
table doesn't always guarantee that rows are inserted in the correct order.

Next I'm creating the individual pages with the Count and Page.Rank method
off the temporary table.

This method is not the best in performance and I'm sure there must be
another
way to perform paging with filtering and sorting. I'm grateful for any tipps
you have.

Thanks for your time & efforts!

Martin

Jul 20 '05 #1
1 1764
Hi!
Just letting you know that I've found an answer to my problem at
http://weblogs.asp.net/pwilson/archi.../10/31456.aspx

titled 'Sorting and Paging in SQL Server' (including Filtering).
It's easy to use and pretty fast!

Martin
"Martin Feuersteiner" <th************ @hotmail.com> wrote in message
news:c5******** **@titan.btinte rnet.com...
Dear Group

A while ago I've asked how paging is possible and have read the articles on aspfaq.com. Great work, esp. the speed comparison of all the different
techniques. Thank you to everyone who has responded to my post. Somewhow
Google didn't let me reply to the thread!

All of the methods described work perfectly fine until I'm trying to
implement a WHERE or ORDER BY DESC on a particular field. E.g. Create all
pages but sort on a date field DESC doesn't start with the lowest date on
the first page and the highest date on the last page but all dates mixed up.
As a workaround I'm at first using a cursor to populate a temporary table
e.g. SELECT * FROM MyTable WHERE MyField1 = Condition ORDER BY MyField2
which only contains the data I would like to use to create the pages. I'm
using a cursor since I read that a normal SELECT to poulate the temporary
table doesn't always guarantee that rows are inserted in the correct order.
Next I'm creating the individual pages with the Count and Page.Rank method
off the temporary table.

This method is not the best in performance and I'm sure there must be
another
way to perform paging with filtering and sorting. I'm grateful for any tipps you have.

Thanks for your time & efforts!

Martin

Jul 20 '05 #2

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

Similar topics

2
3837
by: Navin | last post by:
HI, Guys There has been a lot of Ways to use paging in asp 1>Recordset approach -where whole records are pulled at client side... and then only the records which are needed are filtered.. and now that is not the approach good as we are pulling unnesscary all the 10,000 say for dispalying 100 records...if pagesize is 100 2>i have seen is the Stored procedure approach where data is inserted
1
1260
by: Martin Feuersteiner | last post by:
Dear Group A while ago I've asked how paging is possible and have read the articles on aspfaq.com. Great work, esp. the speed comparison of all the different techniques. Thank you to everyone who has responded to my post. Somewhow Google didn't let me reply to the thread! All of the methods described work perfectly fine until I'm trying to implement a WHERE or ORDER BY DESC on a particular field. E.g. Create all pages but sort on a...
4
1509
by: Coleen | last post by:
Sorry about the multi-posting, but it does not seem as though the other newsgroups are frequented enough to get any advice on this problem...If anyone can possibly help, I would greatly appreciate it, I've spent three days trying figure out why paging won't work for me...TIA. I've been to gotdotnet.com/quickstart...samples and reviewed the Source control for adding paging to datagrids, my problem is that we do not connect to an SQL...
8
4142
by: Matthew Curiale | last post by:
I am creating an app that lists clients of a company for management of different attributes for that company. The first page is a listing of the companies currently in the database. I have my repeater working, and paging/sorting works, but there is a small bug that I can't seem to figure out. If, for example, I display 5 records per page, the paging function executes fine, and only shows 5 records per page. This is no problem. When I...
2
3145
by: saleek | last post by:
Hi, I am trying to figure out why my datagrid has stopped firing the page and sort commands. Scenario: I originally had template columns in my datagrid and had set up custom bi-directional sorting as well as paging of the datagrid records.
4
1477
by: news.microsoft.com | last post by:
I've looked in the help and at each of the properties for the grid view, but can't seem to find what I need. I have allowpaging set to true for my gridview and when the page loads I go and fetch 75 records from the DB, I know there are 750 records total in the DB. How can I control the paging? I don't want to go and get all 750 records at once then allow the grid view to do the paging. Currently the biggest issue I'm facing is how to...
0
3378
by: anonieko | last post by:
This approach I found very efficient and FAST when compared to the rowcount, or Subquery Approaches. This is before the advent of a ranking function from DB such as ROW_NUMBER() in SQL Server 2005 and the likes of it. So This one works with SQL2000 What do you think?
8
8526
by: AG | last post by:
ASP.NET 2.0, VS 2005 I have a gridview with paging enabled, bound to an objectdatasource. Both were dropped on to the page and configured via the wizards. Basically working as expected. The gridview's databind method is apparently called when the page is loaded as I have no code calling the databind method. How can I keep the gridview from databinding automatically and control it myself?
6
2375
by: ewolfman | last post by:
Hi, Recently we've hired professional SEO services to help up promote our website. They claim that pages which contain ASP.NET's Gridview with paging will not be scanned by the different spiders beyond the first page, as the url of the page doesn't change (and should be something like http://myapp/default.aspx?page=1 and so forth). This sounds weird to me, because AFAIK spiders scan anchor tags like the paging tags, and should be able...
2
5509
by: wallconor | last post by:
Hi, I am having a problem using Dreamweaver CS3 standard recordset paging behavior. It doesn’t seem to work when I pass parameter values from a FORM on my search page, to the recordset on my results page. - Recordset Paging works if no parameters are used in the recordset sql code (ie. simple sql code): SELECT * FROM db_name WHERE (db_field1 LIKE ‘%text1%’ OR db_field2 LIKE ‘%text2%’)
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8901
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8660
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7415
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5683
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4209
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2799
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2041
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1792
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.