Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve image file 1

Status
Not open for further replies.

Flyrc

Technical User
May 14, 2002
29
CA
i can load image into table, and qurey the form successfully, but the form6i can not show the image in result. I have to copy and paste into other graphic application.

Question: is there any way can retrieve and read the image file without 9iAS/convert to HTML? Thanks.
 
What is your specific problem? I have a table with blob field and an item in a form of IMAGE type. So I'm able both to store the image, namely with READ_IMAGE_FILE built-in, and retrieve it just by querying this block. ???
 
Thanks sem. I store the image into table by developer form 6i. With form 6i, i can query the table, but no image shown at run time, blank image field in the form layout. However i can copy this blank field and paste onto any graphic application to show the image...

i did not executing the READ_IMAGE_FILE built-in subprogram procedure to get an image from the file system into table.

Thanks for help.
 
Maybe there's smth wrong with Sizing Style or other properties. In fact I've just created a simple form an it works fine.

1. create table img_table (id number not null , img blob, primary key (id))

2. Create database block based on this table accepting all defaults.

3. Add non database item FILE_NAME to input filename to read image from.

4. Add a button with when-button-pressed trigger:
READ_IMAGE_FILE:)file_name, '', 'img_table.img');

5. Run form, enter 1 into ID item, full name of some image into FILE_NAME and press button. The image is here. Commit. Enter query (the block is cleared, no image). Execute query. The image is here again. I've tested with GIF and JPEG but hope all other formats works OK.

Try to compare properties. After all try to issue WRITE_IMAGE_FILE to get a data stored in your item
 
Dear Sem,

I am pretty sure that you are right, something wrong for image property. Let me explain details what i tried base your last message:

1) in form 6i, i successfully setup a button with
get_file_name & read_image_file in trigger to load picture into the image file by button. (I was using copy/paste before.)

2)At run time, i can press button to load image and can see picture in the form layout image field. Even i move between records, they are there.

3)I enter query mode all is blank, then 1 start query, it can show all other filed but no picture shown (suppose it should be there, strange?).

4) I check table column PICTURE property pallete in the form 6i, i have:

General
Name PICTURE
Item type IMAGE
...
Functional
Enabled YES
Image format TIFF
Image Depth ORIGINAL
...
PHYSICAL
Visible YES
CANVAS CANVAS2
Tab page NULL
X position 67
Y position 160
Width 200
Height 150
...

my image file in system is TIFF format and size is exact 200x150 pixcle. When i load it, it is shown in the middle of image field correctly.

I have also tried GIF format for image format & PICTURE property pallette, same result.

Curious to know your Image property pallette information if possible. Thanks very much for your time.

 
As I've already noted I used default properies and did not even save the form.
Now I'm about to be sure that the problem in your general item settings. Is it a database one? Is its database field of long/lob type?

By the way, as far as I know Image format has about no affect because Forms tries to determine file format regardless of this setting.

What is your Forms version number (full)? I use 6.0.8.16.1.
 
As I've already noted I used default properies and did not even save the form.
Now I'm about to be sure that the problem in your general item settings. Is it a database one? Is its database field of long/lob type?

By the way, as far as I know Image format has about no affect because Forms tries to determine file format regardless of this setting.

What is your Forms version number (full)? I use 6.0.8.16.1.
 
Dear Sem,

My form version: 6.0.8.11.3 form builder[32bit]
database version: 9i

Yes, the PICTURE is in database table PRODUCT, as BLOB. I guess maybe my form builder version is too early for BLOB, i will try to use LOB data type.

 
Your Forms version is pretty new. I've tested the same form on 6.0.5.35.3.

Do check again whether your image item is a database element. It seems to me that your item neither reads image from database nor stores it beacause the item is a non base table one. The fact that its name is the same as column name means nothing untill it is not base table item. My database is 8.1.7. Unfortunately I have no 9i installed near me.
Try to check compatibility matrix on this issue.
 
dear sem,

Thanks very much for the suggestion, i agree that the image has not been in database. what i have done today?

1)i use dbms_lob package to load the image into 9i by pl/sql manually. Now they are in 9i and i can query them both by form6i and report6i. So database is fine.

2)i guess some is wrong with my form6i link with 9i?
It seems that many datatype can be loaded into database with form6i GUI, but not image. I tried either copy/paste or read_image_file button, no luck at all. Wrong form6i config?

thanks very much for your help. I will post late after further study.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top