Rodrigo Schmidt wrote:
I have binary data that I want to store at the MonetDB server and manage it through the JDBC interface. I just figured out that Monet's JDBC interface does not implement set/getBytes() or set/getBlob(). I tried to
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.
create a String object out of my vector of bytes through new String(vector) but the string it generates is crap and the system halts.
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.
Any ideas to overcome the problem?
Moreover, while surfing the source code of Monet's JDBC driver I found something weird. I think line 67 of MonetClob.java should be
return(buf.substring((int)(pos - 1), (int)(pos-1 + length)));
I think you're right. That's a bug, thanks!