Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java.sql.SQLException: Before start of result set

Status
Not open for further replies.

simonfisher

Programmer
May 12, 2003
13
AU
Hi,

I keep getting an SQL Exception when the following query is executed but no rows are returned.

Connection Conn =getConnection "jdbc:mysql://localhost/test?user=abc");
Statement stmt = Conn.createStatement();
rs = stmt.executeQuery(Some query);
rs.next();
ErrMessage = rs.getString("Error_Msg");
rs.close();
stmt.close();
Conn.close();
 
Connection Conn =getConnection "jdbc:mysql://localhost/test?user=abc");

thats the wrong way to do it, u have to install MySql ODBC and then create a DSN, u have to use the DSN name in the connection string...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top