Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Printout Results from Count Query

Posted on 2005-04-09
2
Medium Priority
?
216 Views
Last Modified: 2010-04-01
Hi there,
I want to print out the results set from query:

CODE:

ResultSet rs56= Statement.executeQuery("SELECT count(*)FROM Test_Results ");

I have run the query in the db and the result should be a count of 13.

I have in the past used: <%=rs56.getString("County")%>, but there is no field name for this results.

Thanks
Regards
0
Comment
Question by:acslater
2 Comments
 
LVL 8

Accepted Solution

by:
nagki earned 400 total points
ID: 13744685
acslater,
u can rename count(*) to some other variable name like this
ResultSet rs56= Statement.executeQuery("SELECT count(*) as cnt FROM Test_Results ");
rs56.getInteger("cnt");

Nagki
0
 

Author Comment

by:acslater
ID: 13744710
Nagki,
Thanks... that worked...
Regards,
acslater
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my humble opinion (IMHO), TouchDown from Symantec is the best in class for this type of application, but Symantec has end-of-lifed it and although one can keep using it, it will no longer be supported or upgraded.  Time to look for alternatives t…
I’m willing to make a bet that your organization stores sensitive data in your Windows File Servers; files and folders that you really don’t want making it into the wrong hands.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

578 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