Hi,
I tried to directly insert a Java object from typ mottrow.MItem to the table
ITEMS in my embedded Derby DB. But I got the following error:
java.sql.SQLException: An attempt was made to get a data value of type
'BLOB' from a data value of type 'mottrow.MItem'
In the query I used, I had
kab wrote:
Hi,
I tried to directly insert a Java object from typ mottrow.MItem to the
table ITEMS in my embedded Derby DB. But I got the following error:
java.sql.SQLException: An attempt was made to get a data value of type
'BLOB' from a data value of type ' mottrow.MItem'
In the query I
On 5/4/07, Kristian Waagan [EMAIL PROTECTED] wrote:
I'm sure someone will give you the full story, but I believe you might
have to serialize your objects yourself before you store them into the
database as BLOB/VARCHAR FOR BIT DATA (depending on the maximum size of
your objects, or your own
Kevin Bortis wrote:
On 5/4/07, *Kristian Waagan* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
I'm sure someone will give you the full story, but I believe you might
have to serialize your objects yourself before you store them into the
database as BLOB/VARCHAR FOR BIT DATA
You need to serialize the object. One way of doing it is like this:
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(item);
oos.close();
ps.setBytes(1, bos.toByteArray());
An
Hi Kevin,
I think that Kristian and Bernt have given you the workarounds for this
issue. It is true that Java ADTs were supported in earlier versions of
Cloudscape. However, those ADTs were declared in a non-standard way. ADT
support was disabled before the code was open-sourced as