PDA

View Full Version : Paging with Oracle (Extjs related ofcourse)



soulgen
23 Sep 2009, 2:57 PM
Hi, all. I am your Indonesian user.

Here I am doing my school task using ExtJS and Oracle, and I got a problems..

In many tutorials here (and out there) I just found a how to paging with mysql using its query keywords: "START" and "LIMIT" (and extjs's pagingtoolbar) tutorial.

But, since Oracle doesn't have those keywords, then how do I paging my grid?


Second is...

In my messagebox's (Ext.Msg.show({.....})) msg config object, I put this long enough text:

"Anda sedang akan menghapus banyak data sekaligus. Lanjut?"

(it's ok if you did not understand Indonesia, coz it's not the main problem)

The problem is: why I always get a different drawing / render results?


Here is a normal (and properly) render result:

http://calestial.com/rkukuhr/normalmsgbox.png


and here is an unexpected render result:

http://calestial.com/rkukuhr/unexpectedmsgbox.png


Why? and how to fix it?


Thanks before :)

nb: my apologize for my bad english ~o)

soulgen
23 Sep 2009, 9:01 PM
bump

evant
23 Sep 2009, 9:03 PM
1) http://www.google.com.au/#hl=en&source=hp&q=oracle+paging+query&btnG=Google+Search&meta=&aq=f&oq=oracle+paging+query&fp=c5fbc323c9147fb8

2) This is fixed in SVN.

seanfell
23 Sep 2009, 11:16 PM
I do this all the time.. This link gives you the details

http://asktom.oracle.com/pls/asktom/f?p=100:11:2475838193050950::::P11_QUESTION_ID:127412348064

basically your query on the sever is something like

select *
from ( select a.*, rownum rnum
from ( YOUR_QUERY_GOES_HERE -- including the order by ) a
where rownum <= MAX_ROWS )
where rnum >= MIN_ROWS

Where MIN_ROWS & MAX_ROWS are the start & limit values passed by the paging toolbar on your grid