473,480 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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]"
<perseus.usenetNOS...@xs4all.nlwrote:
>
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,
Dave
Jun 27 '08 #1
0 1045

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

Similar topics

59
6798
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?
8
4131
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...
1
1085
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...
1
4079
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...
0
361
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...
0
1982
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
2069
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 .......
1
2026
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...
1
1414
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...
0
7051
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6915
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...
0
7054
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,...
0
6993
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...
1
4794
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4493
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...
0
3003
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...
0
2993
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1307
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 ...

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.