getString problems
Posted by: rbizarre
Date: December 28, 2004 01:25AM

I am having a little problem with my resultsets.
I pass this query to the database

rs = statement.executeQuery("SELECT location FROM location_src_title WHERE id = 1 ");

and then I want the info printed out to the screen(it should be only one record in the set)
so I do this: String val = rs.getString("location");

and later on in the page I write <%= val %>, every time I run the code I get
java.sql.SQLException: Before start of result set

I have concluded that the exception is caused by the getString() method, I am still a novice so there could easily be something wrong with what I have. Am I using the getString incorrectly?? any help in solving this matter would be much appreciated.

Options: ReplyQuote


Subject
Written By
Posted
getString problems
December 28, 2004 01:25AM
December 28, 2004 01:56AM
December 28, 2004 03:24AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.