The Artima Developer Community
Sponsored Link

Java Buzz Forum
JDBC4 - great for blob handling

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Marc Logemann

Posts: 594
Nickname: loge
Registered: Sep, 2002

Marc Logemann is founder of www.logentis.de a Java consultancy
JDBC4 - great for blob handling Posted: Aug 10, 2006 3:59 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Marc Logemann.
Original Post: JDBC4 - great for blob handling
Feed Title: Logemann Blog
Feed URL: http://www.logemann.org/blojsom/blog/default/?flavor=rss2
Feed Description: Marc's thoughts on Java and more
Latest Java Buzz Posts
Latest Java Buzz Posts by Marc Logemann
Latest Posts From Logemann Blog

Advertisement

Currently i am writing a unit test for a cache implementation which is 100% oracle only (this is freelance work and is not related to my product, furthermore i have not written the implementation). So we use an embedded db like derby to test the cache impl against. Of course it was quite fun so far to workaround all those oracle specific sqls but all manageable.

Now one of the last things i have to do was to convert an sql which uses EMPTY_BLOB() function from oracle. The first thing i noticed is the lack of an equivalent function in derby. Hmpf. Ok, then i though i just create an empty blob myself in java so that after retrieving the initial "null" value of the blob field from derby, i place my inital blob in there and let the rest of the cache work as usual. But surprise surprise, there is no out-of-the-box implementation in the SDK for getting an empty but functional java.sql.Blob.

After googling a bit more i noticed that JDBC4 (which is of cours not an option for me because of complex policies at the company i work for at the moment) help here a lot. The Connection interface now has methods like createBlob() and createClob(). Nice to see. This doesnt help me of course in my situation but i will go ahead and create an empty blob implementation for myself.

Read: JDBC4 - great for blob handling

Topic: How To Shutdown & Poweroff Microsoft Windows From Command Line Or Shortcut Key Combination Previous Topic   Next Topic Topic: Steve Roy has posted Jaree 1.1d6, a free-as-in-beer utility

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use