This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Obviously there are many methods of Class can do this under java.sql package,but now the rule is changed, if there is a way out to get done this without the JDBC the ResultSet.getBlob(). If I use a hibernate and Struts,I get a string from view layer and have this value stored into the Transient object.
Originally posted by Jeanne Boyarsky: David, Blobs are binary data whereas Strings are character data. A Clob maps to a String. Or a Blob can map to an array of bytes. Can you clarify a bit?
Thanks for so helpful information.But I have a field in Blob type in my database. It is like a web blog, I want this Blob field can store the text and photos as well. In fact I wanna all things from the client submited. I think since the Blob are binary data, so it can handle any type of data, besides string. and I confused by how converting this.
Consider this, I wrote a blog today, the content of this article is rich enough, it contains photos and words and other ASC codes like a carriage return symbol("\n"). I have all of this blog putted into the Blob field. That is what I am thinking about.
All information in a computer represented by binary data, so, string can trasform bytes data, but I search the API about Clob/Blob, they are interfaces and can be instantiated only by invoking JDBC methods, like ResultSet.getBlob()/getClob();
To sum up, I do not know how to make a Blob type take the client data.