Hi Brandon,
in my Java program the following code works fine. It inserts a row into a table with a LONG column as column 2.
 
byte[] serializedObject;
String name;
...
String insert = "insert into jndi_lookup values ('" + name + "',?)";
PreparedStatement prep = dbConnection.prepareStatement(insert);
prep.setObject(1, serializedObject);
...
prep.executeUpdate();
 
Stefan
 
-----Original Message-----
From: Brandon Kohn [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 19. Oktober 2001 18:40
To: [EMAIL PROTECTED]
Subject: storing serialized objects

Hi all,
 
I'm wondering if it would be possible to store a serialized object in the form of a byte array in a Long [varchar] column.  If not, what would be the best way to store a byte array in the db?
 
Thanks
Brandon Kohn
+377 97 97 41 50 ext. 306 (Work)
+377 97 77 86 71 (Home)
Monaco

Reply via email to