-
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
-
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
>
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks