Hello,
getBytes() works, getBlob() doesn't. All setXXX() don't work, as we don't support updateable ResultSets. When setting/requesting this mode, an SQLWarning or SQLException should be generated telling you so. If not, this is a bug.
I am not trying to use a ResultSet to update values. I am using a preparedStatement, and setBytes and setBlob are not implemented for it in Monet's driver (these calls throw SQLException).
A Vector of bytes, so you have something like: Vector b = new Vector(); for (int i = 0; i < 10; i++) b.add(new Byte((byte)i));
and you want to put that in a String?
byte[] bytes = (byte[])(b.toArray(new byte[b.length()])); String bindata = new String(bytes, "UTF-8");
then feed bindata to the driver. On a PreparedStatement it *should* work.
This is more or less what I do and, unless I made some silly mistake while implementing (it would not be the first time), it does not work. Here it is briefly what I do (with comments pointing out what I verified during debugging): // MAXSIZE = 300000 ByteArrayOutputStream buffer = new ByteArrayOutputStream(MAXSIZE); ObjectOutputStream bufferwrapper = new ObjectOutputStream(buffer); bufferwrapper.writeObject("name1"); // I do not want to write "name1" into the database. This is just // an example. Actually, what I want to write is a Serialized // object. "name1" is just a simple object very suitable for testing. PreparedStatement addpropvalue = connect.prepareStatement( "INSERT INTO name (VERSION,VALUE) VALUES (1,?);"); // name is a table previously created with the structure // (VERSION INTEGER NOT NULL PRIMARY KEY, VALUE VARCHAR(300000)) addpropvalue.setBytes(1,buffer.toByteArray()); byte[] bv = buffer.toByteArray(); // contents checked at this point - OK String v = new String(bv,"UTF-8"); // contents checked again - OK // first bytes are binary code (below 32), last bytes // represent "name1" in ASCII addpropvalue.setString(1,v); addpropvalue.executeUpdate(); // execution stalls at this point. ---- Cheers, Rodrigo