Posted: Mon Oct 01, 2007 2:19 am Post subject: PASSTHRU Database BLOB - Help needed
Acolyte
Joined: 18 Oct 2006 Posts: 65
Hi I have a database table (DB2) that I am creating a new record in from a Java Compute Node. I can successfully write a new record to the table with VarChar, Char data types etc. But I am having trouble trying to convert a String to a BLOB then write it to the appropriate field:
Code:
String dat = "hello";
byte[] datByteArray = dat.getBytes();
MbSQLStatement state = createSQLStatement("IETESTDB", "PASSTHRU('INSERT INTO STD_REQUEST (DAT) VALUES (" + datByteArray + ")';") ;
When the code is executed an SQL0104N Error states that
Quote:
An unexpected token "[" was found following "_TEST (DAT) VALUES("
Am I creating the BLOB in the correct way and passing it through correctly? Thanks
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum