I m getting an exception like " java.sql.SQLException: No Data found " i m using tomcat server and MS SQL as backend.Though i m able to run the query successfully in query analyser and fetch the results ,it does not work in my jsp page. i m calling a prepared statement and passing an int as a parameter My query is like this: pstmt=con.prepareStatement("select userdata.db_user_id,db_user_first,db_user_midl,db_user_last,db_desig_name from executivedata,userdata,designationmaster where db_exec_catg='EXECUTIVE' and db_exec_level=? and executivedata.db_user_id=userdata.db_user_id and userdata.db_desig_id=designationmaster.db_desig_id"); pstmt.setInt(1,(i+1)); is it that the query is not able to fetch the tables and hence no results.please help me get rid of this problem.
Did you verify that this statement pstmt.setInt(1,(i+1)) is producing correct results. i.e Does "i + 1" produce what you are expecting? It seems like you may be calling the resultset's next() method without any valid data.
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley