skip take pagination problem

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Posts: 3
Joined: Fri 25 Sep 2009 14:01

skip take pagination problem

Post by Morpheus » Tue 29 Sep 2009 09:26


I mentioned in a previous message paging problem. Following the update dotconnect, my problem was solved. Off by investigating a little more, I found that the framework of the request by the code swap seemed odd.

Code: Select all

WHERE "Project1"."row_number" > 149
)  "top"
WHERE  ROWNUM <= (299) 
Why the last instruction is "rownum"? because in this case it brings me back 299 record. I was expecting 150 records.

Why the latest "rownum" is not made with the "row_numbre (row_number between 149 and 299)? since then I have 150 records.

Is it intentional or a mistake?

Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 30 Sep 2009 07:29

Judging from your previous code, your numLigneFin variable is the variable responsible for the number of the last line.
But when you call Take(numLigneFin), it takes the number of records to fetch, not the number of the last line to be fetched.
I recommend you to chnage the code in the following way:

Code: Select all

listeSociete = query.Skip ((int) numLigneDebut). Take ((int) numLigneFin - (int)numLigneDebut);

Post Reply