English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Prepared statement has set blob method which takes blob as parameter.But i am not sure how to convert plain java object into blob.Any help would be appreciated.

2006-06-21 17:58:00 · 1 answers · asked by venkat 1 in Computers & Internet Programming & Design

1 answers

If the Java object is of a class that implements Serializable then you can create a byte array output stream and serialize the object to that, then store the byte array as the blob. There is a code example of creating the byte[] at:

http://forum.java.sun.com/thread.jspa?threadID=566550&start=15

2006-06-25 04:37:10 · answer #1 · answered by ymail493 5 · 0 0

fedest.com, questions and answers