Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.9K Databases
- 221.6K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.9K SQL & PL/SQL
- 21.3K SQL Developer
- 295.5K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.2K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 154 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 402 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 230 Portuguese
how to display a blob image stored in another table in a form

I use Oracle Forms 12.2.12.0 and my database is 12c. I made a table to store all photos (in a blob field) I use in my application. And then I made a browser form to display data in that table. So far, so good. Then, I made an independent form to add or update/delete records to that table. While I don't have problem to read a photo from client pc and show it in form, I cannot save it to table. The opposite problem is when I want to edit a record. I cannot read the photo (blob) field and show it in form.
Can you provide me info how to execute the above tasks?
Thanks in advance.
Answers
-
If you want to use native Forms functionality to work with images, you need to use an IMAGE_ITEM and it must be associated with a Data Block. You will use the READ_IMAGE_FILE built-in to load images into the image item from the file system. Once in the DB, you will retrieve them just like retrieving other records, however you will need the record to have a column that can be used to identify the record that has the desired image. So the table might look something like this:
Currently Forms does not support using a bind reference to populate an image item. So you won't be able to do something like:
SELECT BLOB_IMAGE INTO :MYIMAGE_ITEM FROM MYTABLE WHERE IMAGE_ID=1002
The above SELECT won't work.
Michael Ferrante
Senior Principal Product Manager
Oracle
Twitter: @OracleFormsPM
-
Thank you for your answer. I know this so I solved it by making a tmp table with all the fields I want to edit, including the blob field and associated it with the form I use to add/edit a record. When I want to add a new record, I add a record to the tmp table and I let user fill the fields and load the image he wants. When he presses the "Save" button I insert the record to the main table and delete it from the tmp table. When I want to edit a record, I copy it to the tmp table and after finish editing I replace in the original table/record fields that have been changed.
I hope this will help others too.