Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-14-2007, 07:17 PM
Member
 
Join Date: Aug 2007
Posts: 4
ljustiniano is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with connecting to Oracle DB in NetBeans m16k2002 Web Frameworks 3 05-06-2008 10:37 AM
problems with connecting to Oracle DB in NetBeans m16k2002 NetBeans 0 08-07-2007 08:01 AM
Saving Blob through Hibernate Ed Database 1 07-09-2007 05:24 AM
Problems with JSF (columns) Peter JavaServer Faces 2 07-04-2007 07:43 AM
Updating into 2 tables in the DB yuchuang New To Java 2 05-12-2007 07:54 AM


All times are GMT +3. The time now is 05:21 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org