• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Cursor not in ResultSet Proximity

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
Im have a small problem with the following code. When i run the following code, i get the error javax.servlet.ServletException "Cursor not in ResultSet Proximity
"
If anyone could help me with this it would be of great help
This is my code
<code>
<%@page language="java" import=" java.sql.*; "%>
<%Connection con; Statement st=null;%>
<html>
<body>
<P> Opportunities<Table Border=1 CellPadding=0 Cellspacing=0>
<TR>
<TD> Last </TD>
<TR>
<TD> First </TD>
<TR>
<TD> Phone </TD>
</TR>
<%
Class.forName("com.ashna.jturbo.driver.Driver");
con=DriverManager.getConnection("jdbc:JTurbo://10.10.40.83/SFA_RG","sfa_notes","intranet");
st=con.createStatement();ResultSet columns=st.executeQuery("Select LAST,FIRST,PHONE from ContactTest");
while(columns.next());
{
String Last = columns.getString ("LAST");
String First = columns.getString ("FIRST");
String Phone = columns.getString ("PHONE");
%>
<TR>
<TD> <%= Last %> </TD>
<TD> <%= First %> </TD>
<TD> <%= Phone %> </TD>
/TR>
<%
}
%>
</Table>
</body>
</html>
</code>
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have a semi-colon after your while statement. "while(columns.next());" remove it and see what happens.

Bosun
 
Not so fast naughty spawn! I want you to know about
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic