Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > how to get total number of rows contained in a resultset

Reply
Thread Tools

how to get total number of rows contained in a resultset

 
 
Praveen homkar via JavaKB.com
Guest
Posts: n/a
 
      08-05-2005
Hi friends

how to get the number of rows contained in filteredrowset or a simple
resultset.

Thanx in advance

praveen

--
praveen homkar


Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.asp...neral/200508/1
 
Reply With Quote
 
 
 
 
Joan
Guest
Posts: n/a
 
      08-05-2005

"Praveen homkar via JavaKB.com" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Hi friends
>
> how to get the number of rows contained in filteredrowset or a
> simple
> resultset.
>
> Thanx in advance
>
> praveen


for MySQL
rec = st.getResultSet();
d.numCols = rec.getMetaData().getColumnCount();
rec.last(); // move to last row
d.numRows = rec.getRow();
rec.beforeFirst(); // reset to top

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Group By Rows and Total Rows yonialhadeff ASP .Net Datagrid Control 1 01-23-2007 07:44 PM
number of rows in a resultset Liz Java 6 04-15-2006 04:10 AM
To get the total no[count] of rows in a daatable with rowstate deleted thomson ASP .Net 1 06-11-2005 02:03 PM
How to get the total number of rows in a Dataset? =?Utf-8?B?ZGF2aWQ=?= ASP .Net 1 05-03-2005 04:14 PM
problem fetching the total number of rows newbie bhat Perl Misc 0 09-22-2003 09:57 AM



Advertisments