Home » SQL & PL/SQL » SQL & PL/SQL » Maaher Aid
Maaher Aid [message #9885] Thu, 11 December 2003 04:04 Go to next message
hereyedo
Messages: 8
Registered: December 2003
Junior Member
In a previous message you explained like storing in the BD an
image JPG in a BLOB. It wanted that you helped me to know since I do
that that image JPG stored in the data base in a BLOB can
automaticamente see when opening the form.

EDUARDO
Re: Maaher Aid [message #9893 is a reply to message #9885] Thu, 11 December 2003 21:08 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
It can be seen automatically, yes. Forms knows how to treat an image. Here's a quick explanation:
You have a table IMAGES(name VARCHAR2(255), content BLOB). Than you can create a form to maintain this table:
1.Open forms Builder (I'm using V6 here) and invoke the database block wizard (You could do it manually too).
2. First tab: select "table or view". Next.
3. Second tab: select the table 'images'. Select both columns. Next.
4. Third tab: select the first option ("create ...then call the layout wizard.") and click finish.
5. The layout wizard will pop up and displays a welcome page. Click next.
6. First tab: [[New Canvas]] of type content. Next.
7. Second tab: Select both columns to be displayed (click the ">>"). Click on the "Content" column to select it separately. You'll notice that in the Item Type, Forms has already assumed it is an image. Leave it that way. Next.
8. Third tab. Set the sizes and the prompt. In this example I'll leave them as they are. Next.
9. Fourth tab. Select the layout style. I'll keep it to "Form" this time. Next.
10. Fifth tab. Frame title: "Images", records displayed "1", distance between records "0", display scrollbar unchecked. Next.
11. Sixth tab. Congratulations....finish.

Run the form (ctrl+r). If you query your table you'll see that the images are displayed. To store an image via forms. You'll need a button to select the image file via 'READ_IMAGE_FILE' and GET_FILE_NAME.

MHE
Re: Maaher Aid [message #9898 is a reply to message #9893] Fri, 12 December 2003 05:59 Go to previous messageGo to next message
hereyedo
Messages: 8
Registered: December 2003
Junior Member
The question is that the table in which I base the block, has other columns with different item types in the form. Not, if this is the cause, but when I execute the form the image does not appear in screen.

Inclusively, I place execute_query in a WHEN_NEW_FORM_INSTANCE. Stored image JPG already this in the database, in a field BLOB.

I am thankful if you can solve this to me.

HER
Re: Maaher Aid [message #9927 is a reply to message #9898] Sun, 14 December 2003 21:18 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Your execute_query, does it trigger the correct block? If not, do a go block and execute the query. The fact that there are other item types in the form has got nothing to do with it. You do query the correct record do you? If you store an image on one record only and it doesn't appear as the first, well your image won't display.

The rest of the record does appear correctly? Do you store only images in the column?

MHE
New information [message #9928 is a reply to message #9885] Sun, 14 December 2003 22:09 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
I Just looked again at the BLOB usage in Forms (V6), and I ran across this in the help:
----------------------------------------------------------------------
LOBs cannot exceed 65534 bytes.
----------------------------------------------------------------------
That means that a blob is limited to 64KB in Forms. If it exceeds that size, it won't be displayed. In Forms6i, the limit is depending on your virtual memory (although CLOBs still are limited in size: 64k).

MHE
Previous Topic: plsql string question
Next Topic: storage of images in database
Goto Forum:
  


Current Time: Thu Apr 25 19:14:18 CDT 2024