Re: How to store data in BLOB column type
Posted by: Wayne w
Date: October 17, 2006 07:55AM

Blob can store binary data, you might transfer the PrivateKey / PublicKey Object into binary form.
try these:

byte[] key = KeyToBytes(privateKey);
PreparedStatement stmt = con.prepareStatement
("insert into KEYS values (?,?)");
stmt.setInt(1,id);
stmt.setBytes(2,key);

You might use ResultSet.getBytes() to retrieve the data and transfer into a Key Object

Hope that helps

Options: ReplyQuote


Subject
Written By
Posted
Re: How to store data in BLOB column type
October 17, 2006 07:55AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.