RE: Bfiles
"pep0" <[email protected]> Tue, 11 Mar 2003 09:55:39 -0000
| Newsgroups | gmane.comp.db.oracle.devel |
|---|---|
| Organization | SW16 |
| Message-ID | <LYRIS-1796914-907080-2003.03.11-09.54.08--gcdod-oracle#[email protected]> |
Hi!
You can use something like this in a WHEN-BUTTON-PRESSED trigger or
wherever you want...
BEGIN
READ_IMAGE_FILE (
GET_FILE_NAME(
NULL,
NULL,
'Jpeg Files (*.jpg)|*.jpg|' || 'Bitmap Files
(*.bmp)|*.bmp|'),
'ANY',
'image_destination');
END;
But be careful because GET_FILE_NAME built-in does not work in Forms
developed for the Web, so if you want to use it on the net you have to
write a JavaBean to open the file dialog. Check metalink for further
information
(http://metalink.oracle.com/metalink/plsql/showDoc?db=NOT&id=74140.1)
On the other hand you can forget the open file dialog JavaBean an try
something much more easier, but less smart... Call the following
procedure with the complete path of your image --> LOAD_IMAGE
('C:\picture.jpg');
PROCEDURE LOAD_IMAGE (v_filename IN VARCHAR2)IS
BEGIN
IF v_filename IS NOT NULL THEN
READ_IMAGE_FILE(
v_filename,
'ANY',
'image_destination');
END IF;
END;
Hope this helps,
pep0. <-- www.pep0.demon.co.uk --> ... Do you have a developer vacancy
in London? contact me! ...
> -----Mensaje original-----
> De: Carlos . [mailto:[email protected]]
> Enviado el: lunes, 10 de marzo de 2003 20:54
> Para: Oracle
> Asunto: [oracle] Bfiles
>
>
>
> I have a relatively small table in which I store information
> about some products. It is like a small catalogue.
>
> I'd like to include photos of the products. I have these
> photos already stored in a different directory in my hard
> disk but I would like to have the photos in the database instead.
>
> I have the catalogue table in an Oracle9i database table. One
> of the fields of the table stores the location of the images
> and that is how I show them, but this approach is not good
> enough for Internet purposes, because I need to have the
> photos in the server, not in my hard drive.
>
> Can you help me with an Oracle PL/SQL routine for storing the
> images to the bfile field in my table?
>
> Carlitos
>
>
> ELIMINATE SPAM - FORBES PICK!
> Business Quality Web Email,
> Group Scheduling, & Team Tools
> http://www.norada.com/save
>
>
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or
> to unsubscribe send a blank email to
> %%email.unsub%%.
>
>
---
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to [email protected].