Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Wed, 03 Oct 2007 11:23:56 -0400
pjvleeuwen@xxxxxxxxx wrote:
PreparedStatement pstmt = con
.prepareStatement("INSERT INTO `image` "
+ "(`house_id`, `image`) "
+ "VALUES(4, ?)");
Remember, prepareStatement() "[t]hrows ... SQLException ... if a database access error occurs or this method is called on a closed connection."
pstmt.executeUpdate();
This method call returns a value that you should not ignore, nor should you ignore the possible SQLException.
// read from DB
Statement readstmt = con
.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
"Throws ... SQLException ... if a database access error occurs or this method is called on a closed connection"
ResultSet resultset = readstmt
.executeQuery("SELECT * FROM `image` " //
+ "WHERE `house_id` = 4;");
possible SQLException
resultset.first();
Why not call next(), and why, oh, why do you disregard the returned value?
--
Lew
.
- References:
- com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: pjvleeuwen@xxxxxxxxx
- Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: David Harper
- Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: pjvleeuwen@xxxxxxxxx
- Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: David Harper
- Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: pjvleeuwen@xxxxxxxxx
- com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- Prev by Date: Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- Next by Date: Binding table with backened bean in JSF
- Previous by thread: Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- Next by thread: Searching CLOBs through Hibernate
- Index(es):
Relevant Pages
|