Another issue…

August 7, 2006

When attempting to map LONGVARBINARY(hsql) to BLOB(derby)…

An attempt was made to put a data value of type ‘java.lang.String’ into a data value of type ‘BLOB’.

Tried to convert the String to Byte Array. But clueless about inserting ByteArray into the table…      😦 😦 


3 Responses to “Another issue…”

  1. Jen said

    I am working on porting an Oracle database into a Derby one and have recently written a ‘database coping tool’ much like yours! Whilst searching the web I found blog and thought I could give you a hint on your string into blob question as I have just spent this morning trying to figure it out!!!

    String testString = “HELLO WORLD!”; bais = new (testString.getBytes());
    ps.setBinaryStream(1, bais, bais.available());

    (where ps is your Derby prepared statement)

  2. taurivalor said

    Thanks Jen…

    I will try out your solution and let you know the result..


  3. You stupid ass. This is a fantastic blog name. You got and have sat on it for over three years. Idiot. Click

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: