Re: trouble viewing image thru reports 9i

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 21 May 2004 21:04:58 -0700
Message-ID: <1085198703.978783_at_yasure>


Glen A Stromquist wrote:
> This is completely new territory for me, so please bear with me...
>
> Our pr dept asked if I could create a database to store employee images,
> titles etc.., sounds easy enough, so I do the following:
>
> create a user in an 8.1.7.4 generic db I use for testing called "user1",
> do necessary grants such as connect, select any table, create any
> directory etc.
>
> log in as user1 and
> create table emplist with:
> first_name varchar2
> last_name varchar2
> title varchar2
> empno number
> picture bfile
>
> create directory "image_dir" as 'c:\oraimage\';
>
> insert into insert into emplist values
> ('name','lastname','dba',1,bfilename('image_dir','image.jpg');
>
> 1 row inserted
>
> commit;
>
> I then open up reports builder 9i and create a new report with web and
> paper layout, connecting as user1 and using select * from emplist; for
> the data, displayed in simple tabular report. When I go to paper layout,
> I keep getting:
>
> "ora-22288 file or LOB operation GETLENGTH failed the system cannot find
> the file specified. ==> select * from emplist;"
>
> I've also tried select the column names themselves in case it didnt like
> the "select *", but it makes no difference.
>
> I made sure the file "image.jpg" exists in c:\oraimage, and I've tried
> both using the trailing \ when defining AS and not using it (c:\oraimage
> and c:\oraimage\)
>
>
> I have read what I can in the doc's, changed the file type for the
> "picture" field in property inspector to "image" like it says, but still
> no go.
>
>
> I'm obviously missing a step here, can anyone here see what I
> (obviously) can't?
>
>
> TIA
Store the picture in a BLOB.
http://www.psoug.org/reference/dbms_lob.html for a demo, near the bottom, of how to do it. Look for the demo with a table named PDM.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Sat May 22 2004 - 06:04:58 CEST

Original text of this message