Displaying total records


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Displaying total records

  1. #1
    Han Thai Guest

    Displaying total records


    Hello,

    Does anyone know if there is a function in Java to count the total records
    in a resultset? I would like to display the total records retrieved from
    a query before the table of results. Please help. Many thanks in advance.

    Han


  2. #2
    Kent Guest

    Re: Displaying total records


    Han,

    There is no method in the ResultSet interface to do this. Instead, just use
    another query beforehand:

    select count(*) as record_count from table_name

    Regards,
    Kent


    "Han Thai" <hthaifr@hotmail.com> wrote:
    >
    >Hello,
    >
    >Does anyone know if there is a function in Java to count the total records
    >in a resultset? I would like to display the total records retrieved from
    >a query before the table of results. Please help. Many thanks in advance.
    >
    >Han
    >



  3. #3
    Han Thai Guest

    Re: Displaying total records


    Thanks, Kent.

    Regards,
    Han


    "Kent" <kb@essential.com.au> wrote:
    >
    >Han,
    >
    >There is no method in the ResultSet interface to do this. Instead, just

    use
    >another query beforehand:
    >
    >select count(*) as record_count from table_name
    >
    >Regards,
    >Kent
    >
    >
    >"Han Thai" <hthaifr@hotmail.com> wrote:
    >>
    >>Hello,
    >>
    >>Does anyone know if there is a function in Java to count the total records
    >>in a resultset? I would like to display the total records retrieved from
    >>a query before the table of results. Please help. Many thanks in advance.
    >>
    >>Han
    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center