Greetings!!! I have listing.jsp where i display all the records from the DB. JOBCODE is displayed as a link and onClick is calling detail.jsp?par=somenumber, so i am passing par=111 to a detail.jsp. This page fetches passed jobcode and it supposed to bring all the details for that jobcode that are in DB. However that is not happening. Error i am getting is javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] Invalid cursor state Below is the detail.jsp. Same error occurs even if i hardcode jobcode. Hopefully someone can help me out. Sorry if i am not clear enough. It's 2:30 AM, and my eyes are leaking out. <%@ page language = "java" import = "java.sql.*" %>
Your error message is coming from the Microsoft ODBC driver. The JDBC-ODBC bridge isn't thread-safe, so that MIGHT be your problem. Then again, if I really wanted to inflict pain on someone, I'd make them work with ODBC at 2am even without Java !
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Mar 07, 2001
Thank you Tim. One way or the other but i got it to work somehow. m, phx
The first row in a ResultSet is always empty. When you want to retrieve the results from a select returning a single result you have to make sure it has returned at least one result by attempting to push the cursor forward:
Same for a query that return multiple rows except that you use while instead of if. Dave.