I keep getting an error.. I've been staring at this code for a full day now.. I'm probably missing something fairly easy. If you could point my problem out to me.. that'd be great.
try
{
db.connect();
}
catch (ClassNotFoundException e)
{
throw new ServletException("Database drivers not available", e);
}
catch (SQLException e)
{
throw new ServletException("Database URL is wrong", e);
}
try
{
String f_foundimg = v_animg+".jpg";
String sql0 = "update K9Manager set foundimg = ? where intakeno = " + v_animg;
PreparedStatement ps0 = db.createPreparedStatement(sql0, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
ps0.clearParameters();
ps0.setString( 1, f_foundimg );
int RowsUpdated = ps0.executeUpdate();
ps0.close();
db.close();
}
try
{
db.connect();
}
catch (ClassNotFoundException e)
{
throw new ServletException("Database drivers not available", e);
}
catch (SQLException e)
{
throw new ServletException("Database URL is wrong", e);
}
try
{
String f_foundimg = v_animg+".jpg";
String sql0 = "update K9Manager set foundimg = ? where intakeno = " + v_animg;
PreparedStatement ps0 = db.createPreparedStatement(sql0, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
ps0.clearParameters();
ps0.setString( 1, f_foundimg );
int RowsUpdated = ps0.executeUpdate();
ps0.close();
db.close();
}