Delphi Event generation and handling , using TclientDataSet with pagination --> urgent

Posted on 2006-04-19
Last Modified: 2010-04-05
How to go about Delphi Event generation and handling and using TclientDataSet.

1) input to the TclientDataSet will be an XML with the database values

the problem is ,

1) i am new to delphi

2) from the database the no of records retreived will be around 30000 , but in need to show only first 1000 records at the start, after the user scrolls up to the last record , i need to generate an event which will hit the database to get the next set of 1000 records and so on.(pagination should occur).

How to tackle this situation. i am using an EJb application deployed as an web service, which will retreive the values from the database.

I need a suitable design and a solution in terms of idea and little bit of code snippets will be nice of you.
Question by:javaoptimizer
    1 Comment
    LVL 6

    Accepted Solution

    Check the stateless fetching example from this site:

    It shows how the pass a key value from the client to the server and fetch the next set of records (using PacketRecord property).

    For your case, you may need to modify the BeforeGetRecords of DataSetProvider to return a resultset of a query something like this:

    Select Top 1000 * From TableName
    Where ID > SomeValue

    This will work only if the ID s are incremental.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Suggested Solutions

    Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
    In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now