473,239 Members | 1,652 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,239 software developers and data experts.

Re: LinqToSql Paging problem (bug?) with Skip and Take

You wrote a great deal and there is so much I would have liked to
elaborate on but this really de-railed the whole debate. You posted
that linq DOES throw an exception if its not ordered, and that runs
contrary to my experience.

On Apr 21, 1:26 am, "Frans Bouma [C# MVP]"
Back to the linq provider: using skip/take without orderby gives an
exception. This is to prevent that your application keeps on working
and produces WRONG results.
We wouldn't be having this conversation if it had thrown an error. It
doesn't. For as much as I'd like linq to provide its own default
consistent paging-semantics friendly row ordering when one isn't
specified, i don't mind having to provide my own. But I did NOT expect
linq to just start spitting random rows at me.

After finally determining the right place to look in the linq to sql
docuentation: it turns out in linq to sql, skip/take on an unordered
query is 'undefined', not 'throw an exception'.

Personally I still think it should throw an error rather than
returning something that's undefined, and that it would be useful for
linq to impose a default ordering that would be consistent between
page requests on its own (although I understand that would impose a
performance hit on certain types of query -- so maybe it should be an
option instead of automatic (e.g. page(int skiprows, int takerows,
bool AutoOrdering) but that's a question for the next version i guess.
At least the issue is documented if you look in the right place.

-best regards,
Jun 27 '08 #1
0 1034

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

Similar topics

by: AK | last post by:
I tried to google "skip scan DB2" but came up with nothing. Does DB2 have the feature under a different name?
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...
by: joerage | last post by:
Hi, I use a grid view in asp.net 2.0 connecting to a objectdatasource. The datasource select method returns an arraylist of custom object. Reading the documentation for the objectdatasource, it...
by: Maria | last post by:
Hi, I have read about paging, segmentation and paged segmentation and I believe I have (nearly) understood how these techniques are implemented in hardware. However, I am till confused about the...
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 378 open ( +3) / 3298 closed (+34) / 3676 total (+37) Bugs : 886 open (-24) / 5926 closed (+75) / 6812 total (+51) RFE : 224 open...
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...
by: Tyno Gendo | last post by:
Hi everyone I'm just wondering if anyone has some code already for a hotmail style paging mechanism. Rather than showing all page numbers 1 2 3 ... etc. It does this: 1 2 3 4 .... 10 .......
by: Bram | last post by:
I'm writing an application using LinqToSQL. Basically the application works as follows: - Read a file - Add rows to the database (the rows belong to more than one table). - Call...
by: =?Utf-8?B?S2ltIFM=?= | last post by:
In my professional work I work with SQL server express and VS 2008 Pro and re I know how to connect LinqtoSql. But then I work on my own computer with SQL server express and VS 2008 express its...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
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...

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.