php_beginner — 2012-10-15T22:22:50-04:00 — #1
I am new to oracle and wish to have some helps here. Currently, I have query which convert the image file into the binary format before store into MySQL database.
Now, I need the image file to store into the oracle. I just want to make sure/ensure the differences of the query.
Here the query for MySQL:
strInsertQuery += formatObj.getHexForFile(formatObj.getDecodeBase64(arrVal.get(i).toString())) + ", ";
If I want to convert the image into the binary file into oracle db, can I use the same code as above or what changes I need to make
to get it work in oracle.
Thanks in advance
logic_earth — 2012-10-15T23:54:12-04:00 — #2
The code you posted as nothing to do with MySQL. So yes it would work with Oracle. But you don't need to do that, you can store binary data as is. Use the blob for the column type.
kylewolfe — 2012-10-16T09:40:14-04:00 — #3
As long as the column you are storing to isn't truncating the data, it will be fine. The logic you have posted is from a server side language, it really doesnt matter where you're storing the result and retrieving it from.