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.
Hi, I coded the following statement to select rows from the JobTable for a particular skills. If the there is no row for that skills I want to display "No matches found " for that skills. My question is what I have to code to find out whether the SQL query fetched rows or not. ResultSet rs = statement.executeQuery("Select * "+ from JobTable where Skills = " +var_WhereClause ); Thanks Deepa
If you need to do something special on the first row (like produce a heading), you can add a test:
The "do ... while" is necessary in the last case because the "if (rs.next())" line consumes the first row, so you can't do a for loop. ------------------ Phil Hanna Sun Certified Programmer for the Java 2 Platform Author of : JSP: The Complete Reference Instant Java Servlets
Phil Hanna<BR>Sun Certified Programmer for the Java 2 Platform<BR>Author of :<BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072127686/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072124253/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">Instant Java Servlets</A>