Results 1 to 1 of 1
- 08-14-2007, 06:17 PM #1
Member
- Join Date
- Aug 2007
- Posts
- 4
- Rep Power
- 0
Problems updating blob columns on Oracle 9
Hi folks
I'm trying to update a BLOB column in this way...
public boolean saveBlob(String pUpdate, String pData)
{
boolean retValue = false;
PreparedStatement stmt = null;
try
{
InputStream in = new ByteArrayInputStream(pData.getBytes());
stmt = connection.prepareStatement(pUpdate);
stmt.setBlob(1,in);
stmt.executeQuery();
retValue = true;
in = null;
}
catch(SQLException e)
{
retValue = false;
System.out.println(e);
}
finally
{
stmt = null;
return retValue;
}
}
I'm calling this method in this way..
d.saveBlob("update table set data = ? where id = 2435", " .... data .....");
I got very rare behavior into the method. When the line statement stmt.setBlob(1,in); is executed the instruction pointer jump to the finally block without an exception. I don't understand what's happening here...
I will appreciate any kind of help about this behavior.
Leo
Similar Threads
-
problems with connecting to Oracle DB in NetBeans
By m16k2002 in forum Web FrameworksReplies: 6Last Post: 03-25-2009, 10:14 AM -
Saving Blob through Hibernate
By Ed in forum JDBCReplies: 2Last Post: 01-05-2009, 05:03 AM -
problems with connecting to Oracle DB in NetBeans
By m16k2002 in forum NetBeansReplies: 0Last Post: 08-07-2007, 07:01 AM -
Problems with JSF (columns)
By Peter in forum JavaServer Faces (JSF)Replies: 2Last Post: 07-04-2007, 06:43 AM -
Updating into 2 tables in the DB
By yuchuang in forum New To JavaReplies: 2Last Post: 05-12-2007, 06:54 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks