BINARY



Hello all,

I want to export a field type like BINARY, VARBINARY, LONGVARBINARY
from a table save the result in a file (for example xml) and insert it
later to another table.

Could i read the result with getString() or should i read it with
getBinary and change it then to String to store it in the file?
How do I insert it with PreparedStatement?
Like this:
PreparedStatement pstmt = conn.prepareStatement("INSERT INTO table
('test') VALUES ('?' );
byte[] varByte = xmlValue.getBytes();
pstmt.setBinary(1,varByte);

That doesn't work, i will get some sh...

How do I handle binary-Fields when I like to save it in the time
between export and import?

Thanx to all...
Stefan

.