Stroed Procedure for Executing Dynamic Sql Query with Pagination

  • Dear Guys,

    Is there any stored Procedure Written by Microsoft or anybody to fetch data for the Query Passed to it with Pagination(ie only certain record like Page number and Page Size as parameter). I was told by somebody that microsoft provided that kind Stored Procedure which can be used any project and it is efficient one.

    With Regards

    Rajan

  • Hi there, please go through the following link ; i guess thats what you wnated exactly

    Link : Paging and Versioning Using ROW_NUMBER() - Lawrence Moore

  • Dear Lawrence Moore,

    Let me explain in detail about my requirement.

    I want to write a stored procedure which is used by any application

    (mostly for help window / Pick list / Listing the stored data)

    The consumer will call this SP and pass a SQL Query, Page Size and Page Number. they want only particular Page Record.

    Somebody told me "There is a Stored Procedure(Data Pattern) written By Microsoft similar to Enterprise Library.

    Do you have procedure which can be directly used for any application.

    With Regards

    Rajan

  • Palanivelrajan (6/17/2010)


    Dear Lawrence Moore,

    ROFL

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • bteraberry (6/17/2010)


    Palanivelrajan (6/17/2010)


    Dear Lawrence Moore,

    ROFL

    :hehe:

  • Palanivelrajan (6/17/2010)


    Dear Lawrence Moore,

    Let me explain in detail about my requirement.

    I want to write a stored procedure which is used by any application

    (mostly for help window / Pick list / Listing the stored data)

    The consumer will call this SP and pass a SQL Query, Page Size and Page Number. they want only particular Page Record.

    Somebody told me "There is a Stored Procedure(Data Pattern) written By Microsoft similar to Enterprise Library.

    Do you have procedure which can be directly used for any application.

    With Regards

    Rajan

    Palani, i am not aware of anything like that.. probably we will wait for some of our other guys to pitch in..

  • The question is why you would want it? What's the point of a stored procedure that can execute any SQL - that's just the same as running ad-hoc SQL.

    Assuming you're referring to a .Net application, it has plenty of methods for dynamically generating queries based on a data model, displaying in a DataGrid and handling pagination seamlessly.

  • Hai,

    Why I am not preferring to use the data grid, Since it fetches data from the database and keep it in the Web Server. It is overhead for the web server and reduces application performance. if we reduce the number of record returned from database then it won't be a overhead.

    With Regards

    Palanivelrajan.L

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply