Load images to oracle table.

anumoses
anumoses used Ask the Experts™
on
Is there any process to load jpeg images into oracle database using a procedure ? The database column will be a blob. I googled, but could not find any that I can use.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
If the image is on the database server:
dbms_lob.loadblobfromfile.

Here is an example asked just the other day:
https://www.experts-exchange.com/questions/29132161/INSERT-IMAGE-IN-TABLES-USING-ORACLE.html

Author

Commented:
images is on the local computer
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
When you mentioned procedure I was thinking an Oracle Stored Procedure.  Those cannot access a remote file system.

You will need some program running on that computer.  I believe SQL Loader can handle BLOBs but I've never tried.

You ask a lot of Forms questions:  You should be able to upload the image using forms and process it from there.  Might be a simple insert statement from Forms.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Helena Markováprogrammer-analyst

Commented:
In Forms you can use WEBUTIL.Here is a piece of working code:
b_success := webutil_file_transfer.Client_To_DB_with_progress
                                    (clientFile      => :BC_FILE.S_FILE_NAME
                                    ,tableName       => MY_TABLE'
                                    ,columnName      => 'B_FILE' --blob
                                    ,whereClause     => 'N_ATTACH_ID = '||X_N_ID -- PK
                                    ,progressTitle   => 'Upload to Database in progress'
                                    ,progressSubTitle=> 'Please wait'
                                    ,asynchronous    => false
                                    ,callbackTrigger => null
                                    );

Author

Commented:
thanks for the very informative help.

Author

Commented:
thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial