Posted: Tue Dec 16, 2003 10:35 am Post subject: inserting a BLOB into Oracle
Voyager
Joined: 13 Oct 2003 Posts: 88
Hi all,
I have a problem when I try to insert a message into a BLOB in an Oracle Database.
The error I'm getting is [MERANT][ODBC Oracle 8 driver][Oracle 8]ORA-01465: invalid hex number.
This is the ESQL that I'm using
INSERT INTO Database.MSG_STORE (MSGID,MSGDATA)
VALUES (CAST(Root.MQMD.MsgId AS CHAR),Root.BLOB.BLOB);
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
It might be the MSGID part. The CAST will output the MSGID with |x'| at the front of the string and |'| at the end (used pipe, so quotes show up clearer). Maybe you need to SUBSTRING it FROM 3 FOR 48.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Thank you very much for your response. I should have given more information about the table
MSGID is defined as VARCHAR
MSGDATA is defined as BLOB.
I have made another test with another table. This new table has MSGDATA defined as CLOB. If I cast the Root.BLOB.BLOB to char it works.
I think is something related to the installation of Oracle.
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