You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by me...@storycounty.com on 2002/07/25 18:26:06 UTC
UltraDev 4 & Tomcat on AS/400: Cursor Position Not Valid
I am having some problems with my web application using IBM's new HTTP
Server with ASFTomcat.
I have written an application in UltraDev to search at DB for records
corresponding to a registration number.
It works like greased lightning when there is actually a record in the
recordset, but the application pukes
and gives me an error when I tried to query for a numbe that does not
exist, and gives me a "Error 500:
cursor position invalid."
I know that this is a problem with the record set: Here is the code:
<%@page contentType="text/html; charset=iso-8859-1" language="java"
import="java.sql.*"%>
<%@ include file="Connections/connAS400.jsp" %>
<%
String rsBoaties__MMColParam = "%";
if (request.getParameter("BoatNumber") !=null) {rsBoaties__MMColParam =
(String)request.getParameter("BoatNumber") ;}
%>
<%
Driver DriverrsBoaties =
(Driver)Class.forName(MM_connAS400_DRIVER).newInstance();
Connection ConnrsBoaties =
DriverManager.getConnection(MM_connAS400_STRING,MM_connAS400_USERNAME,MM_connAS400_PASSWORD);
PreparedStatement StatementrsBoaties =
ConnrsBoaties.prepareStatement("SELECT REGNUM, CITY FROM BOATLIB.BTFPAA
WHERE REGNUM LIKE UPPER('%" + rsBoaties__MMColParam + "%')");
ResultSet rsBoaties = StatementrsBoaties.executeQuery();
boolean rsBoaties_isEmpty = !rsBoaties.next();
boolean rsBoaties_hasData = !rsBoaties_isEmpty;
Object rsBoaties_data;
int rsBoaties_numRows = 0;
%>
Any ideas? It would be greatly appreciated. I am stumped.