BLOB insert and retrieve from Database using JDBC

Hi All,

I have the below requirement of inserting and retrieving blob data in database.

Sours system converts an image into base64Encode and send as a string to wM.

We converted the string to base64Decode and inserted as blob(byte.array) in DB column.

But, I am not able to convert that blob to string when I try to retrieve the blob from DB and convert that bytes to String.

Also,There is an another table which has a blob data already in it and I am able to Encode them as a String.

I guess their is a problem in the way I insert that blob data.

Please suggest on how this needs to be done.

Thanks,
Sathya

Hi Sathya,

if possible can you store the encoded String as a CLOB in the database?

Please share the following informations:
wM Version
JDBC Adapter Version
Database type and version
JDBC Driver version

If possible, a sreenshot of the adapter services and the flow snippets might be helpful for us.

Regards,
Holger

Hi Holger,

The Datatype is already defined at end system DB as Blob so we cannot change it.Moreover, I am able to fetch the blob values inserted from other systems in to the DB and encode them .But,I am not able able to fetch the values inserted via wM.

Going through the forums,I believe writing blob through wM JDBC has some issues and most of them use a custom java code for this.

Below are the details:

wM version:9.0.1.0
JDBC version: I guess 6.5
data base is oracle
and driver is ojdbc6.jar

It will be helpful if you share any custom java code to call a jdbc service in java.

Thanks,
Sathya