Solved

Before start of result set ???

Posted on 2002-04-10
8
292 Views
Last Modified: 2008-02-26
I have this sql which i hope is correct but when i tried to use count1, i keep getting this error. Before start of result set even though i did result1.next();

"SELECT custM_ID,custF_ID,date,count(dateID) as count1 from date_particular group by custM_ID,custF_ID having (count(custM_ID) = "+j+" or count(custF_ID) = "+j+") and month(date) = '"+request.getParameter("MONTH")+"' and year(date) = '"+request.getParameter("YR")+"'"
0
Comment
Question by:yan_er04
8 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 6933754
can you post your entire code.. and point out where the error is?
0
 
LVL 2

Assisted Solution

by:coreyit
coreyit earned 25 total points
ID: 6934386
Try outputing the boolean returned by result1.next() to see if you actually received anything.

-corey
0
 
LVL 92

Accepted Solution

by:
objects earned 25 total points
ID: 6941015
I'd say your query is returning no rows.
Check your query returns something.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:coreyit
ID: 6942823
Checking the boolean value returned by ResultSet.next(), or, better, ResultSet.first(), should be sufficiently indicate whether or not you have any results.

-corey
0
 
LVL 92

Expert Comment

by:objects
ID: 6943354
I was suggesting running the query directly on the database, not thru Java. The problem may be in their construction of the query in Java.
0
 
LVL 2

Expert Comment

by:coreyit
ID: 6943429
good point
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9553217
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between objects and coreyit.  
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Kuldeepchaturvedi
EE Cleanup Volunteer
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
There's a lot of hype surrounding blockchain technology. Here's how it works and some of the novel ways it' s now being used - including for data protection.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

840 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