This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Kelvin, Method "next()" of interface "java.sql.ResultSet" returns a boolean. Perhaps you have reached the end of your "ResultSet". Also, your error handling code simply prints "Error" on the console. Since you are using a GUI, perhaps you forgot to look at the console to see if "Error" is getting displayed?
Perhaps your code should be something like:
And remember to check the console for error messages. Of-course, I think there are better ways of informing the user (of your GUI application) that an error has occurred, but I think that is beyond the scope of your question. (Maybe you could try the Swing forum?)
Good Luck, Avi.
Joined: Mar 27, 2004
Hello Avi, I know that the that the next method returns a boolean .. And I have tried to check the console. But cant see "error".
This is the code for the GUI button which calls the method which I posted earlier.
These are the methods in the GUI class.
ResultatVO resultat; defined as global variabel. Hmm?