How can I implement custom paging with retrieval procedures?

Posts   
 
    
Posts: 2
Joined: 08-Sep-2009
# Posted on: 08-Sep-2009 14:09:39   

I have more than 50k records in my database and I need to bind this data to data grid by showing 10 records at a time. If I retrieve all records it is taking too much time. So I've implemented custom paging to retrieve the page size count records with the help of adapter.FetchTypeList(...) method by passing parameters like page number,page size..

But How can I implement the same thing with the procedures?. Right now I'm using the LLBLGEN pro v2.0(licensed).

do we have the solution for this prob in this version Or it's a future development? Please let me know.

Thank you.

Regards, Karunaker Reddy

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 08-Sep-2009 20:56:32   

If the LLBLGen paging is working for you, why do you need to reproduce it using stored procedures ? I'm not sure I see what the problem you are trying to solve actually is ?

Matt

Posts: 2
Joined: 08-Sep-2009
# Posted on: 09-Sep-2009 07:47:31   

MTrinder wrote:

If the LLBLGen paging is working for you, why do you need to reproduce it using stored procedures ? I'm not sure I see what the problem you are trying to solve actually is ?

Matt

Thanks for your response. From past 2 years I'm working on a project which uses llblegen. More than 70% of the list (list pages displays data over datagird) pages are implemented with llblGen retrieval procedures. These pages are taking too much time to load becoz of huge amounts of data binding at a time. And rest 20 to 30% of pages are implemented with adapter.fetchtypedlist method and working fine. With this method I'm able to retrieve 10 rows from the result set, so that performace got improved. Right now I cannot replace the retrieval procedure logic with adapter.fetchtypelist method. I wanna retrieve and bind 10 rows at a time for every page index change in datagrid with retrieval procedures. Is it possible?. Do we have the solution? or It's a future developement in llblgen pro?

Please let me know what is the solution for this problem.

Thank you.

Cheers, Karna

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 09-Sep-2009 12:07:39   

Stored Procedures are the ones formulating the SQL Query not LLBLGen Pro, so you should implement Paging within your StoredProcedure, and add a couple of parameters to the SP, to get the PageSize, and PageNumber requested, so you can pass these from your application when calling it using LLBLGen Code.