Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Getting error in data out & in an object

  Asked By: Arland    Date: May 20    Category: Java    Views: 793
  

i'm getting this error, i'm using
jdatastore, trying to get data out & in an object... anyone
know why this error???<br><br>i did added a
ResultSet1.next after the executeQuery... then i remove it, but
the i get a positioned before first data row... is it
cos my rsultset is empty? i alreafy testef that with
a resultset == null, but that doesn't work
either<br><br>com.borland.datastore.jdbc.SqlState: ResultSet is positioned after
last data
row<br> at com.borland.datastore.jdbc.SqlState.b(Unknown
Source)<br> at com.borland.datastore.jdbc.SqlState.g(Unknown
Source)<br> at com.borland.datastore.jdbc.c.b(Unknown
Source)<br> at com.borland.datastore.jdbc.c.a(Unknown
Source)<br> at com.borland.datastore.jdbc.c.getInt(Unknown
Source)<br> at com.borland.datastore.jdbc.BResult.getInt(Unknown
Source)<br> at
prjcstb.DbConnector.getInfoRef(DbConnector.java:182)<br> at
prjcstb.ServerDiensten.getInfoRef(ServerDiensten.java:41)<br> at
prjcstb.ClientControl.getInfoRef(ClientControl.java:25)<br> at
_0002fnaamref_0002ejspnaamref_jsp_7._jspService(_0002fnaamref_0002ejspnaamref_js\
p_7.java:73)<br> at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)<br> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)<br> at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:1\
74)<br> at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)<br> at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)<br> at
com.borland.jbuilder.webserverglue.tomcat.jsp.JspLoaderEcho.service(Unknown
Source)<br> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)<br> at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)<br>
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)<br> at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConne\
ctionHandler.java:160)<br> at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)<br\
> at java.lang.Thread.run(Thread.java:484)

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Corinne Rogers     Answered On: May 20

You need to check to see if the ResultSet.next() returns
true:<br><br>if(resultSet.next()){<br> String value =
resultSet.getString("column");<br>}

 
Didn't find what you were looking for? Find more on Getting error in data out & in an object Or get search suggestion and latest updates.




Tagged: