String to Blob with TJdbcOuput and Oracle driver

One Star

String to Blob with TJdbcOuput and Oracle driver

Hello,
I have a long input String and need to save it into Oracle database via JDBC.
When i look convert TalendType to get blob in database i see : Id_Object => Blob
Someone could say me please how construct this object from a String ?
Regards
Four Stars

Re: String to Blob with TJdbcOuput and Oracle driver

Hi,
Need to convert your input string to byte[]
Then insert this byte to BLOB column. Pl refer...
https://community.talend.com/t5/Design-and-Development/Inserting-BLOB-or-CLOB-data-into-a-database/t...
earlier I have inserted a CSV file into MySQL BLOB. I can read the contents of file in BLOB column.
Vaibhav
One Star

Re: String to Blob with TJdbcOuput and Oracle driver

Thanks, with Mysql you can do as this but TOracleOut need data type Object not byte[]
Four Stars

Re: String to Blob with TJdbcOuput and Oracle driver

In the referred routine java code, convert to Object in place of byte[].
Is there any other problem?
Vaibhav
One Star

Re: String to Blob with TJdbcOuput and Oracle driver

Yes , but what kind of of Object? How construct this object?
One Star

Re: String to Blob with TJdbcOuput and Oracle driver

Finally it works with myString.getBytes()
Thanks and regards