Upload Image BLOB field Oracle

Dicas do Oracle Forms Builder - Blocos, Itens, LOV, Canvas, Triggers, comandos, PLL, d2kwutil, FMB, Alert, menus, etc
Post Reply
diegorp
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 49
Joined: Mon, 23 Mar 2009 10:44 am
Location: Sapiranga - RS

Good afternoon, I have a table in the oracle xe bank with a field blob where I record an image, so far all right .... the problem now is the forms upload this image on the screen, I read several topics that talk about blob but not I understood very well, then I also need to load this image in a report of Reports, I need help to know which codes I should use to read this field blob and show the image screen.

Use forms 6i
Banco Oracle Xe
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

Ola Diegorp,

I'm not developer Forms, but since no one has updated this topic, I did some forum surveys on this topic.

BINARY LARGE OBJECT) is a field that allows you to store information from different types such as images, videos, audios, documents (Word, Excel, PowerPoint) among other things. It allows you to store data up to 4GB (Oracle 8i), 8T (Oracle 9i / 10G) or up to 128 t (Oracle 11g).

I found some interesting English links that explain how to import and save on the bank images in Campos Blob via Forms.
http://www.orafaq.com/forum/t/51889/67467/ http://www.orafaq.com/forum/m/137074/67 ... msg_137074 http://www.orafaq.com/forum/m/136899/67 ... msg_136899 http://www.orafaq.com/forum/m/136418/67 ... msg_136418 http://www.orafaq.com/forum/m/163347/67693/#msg_163347

Despite being in English, they present several codes At Annexes (Scripts PL / SQL and even FMBs).

also has these links in Portuguese:
http://profissionaloracle.com.br/blogs/ ... -forms-6i/ http://en.glufke.net/oracle/viewtopic.php?p=5099 http://manoel-oliveira.blogspot.com.br/ ... racle.html

Please, Continue to post here if this information does not help you.

Hugs,

Sergio Coutinho
AlexTR
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 48
Joined: Mon, 25 Jun 2012 3:30 pm

Good taking advantage of the topic that is about blobs.
Well, it's been a while since I want to do it but I do not know how, I do not have the minimum notion.
I want to do the following (this has to do with forms too): When the user clicks for example on a button it will open MS Word (Microsoft Word) and this file may be saved both inside the bank or Just manage to a folder, I do not have the least notion how do I do this can help me?
arthae
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 52
Joined: Mon, 09 May 2011 1:13 pm
Location: Porto Alegre - RS
GIVE ME COFFEE AND NO ONE GETS HURT!

Alex, take a look at the OLE2 package.
Here in the forum has topics on this too!
schnu
Rank: Analista Pleno
Rank: Analista Pleno
Posts: 110
Joined: Tue, 24 May 2005 9:16 pm
Location: Dongguan - Guangdong - China
Deus criou os loucos para confundir os sábios

Diegorp

in Forms You will add the table and the blob column you arrow to be image, being a database item = yes

Dai I did the following, I created a button where it will open a window to choose the file you want to write within this column

Select all

declare 
	-- 
 photo_filename VARCHAR2(254);  
 -- 
begin 
 -- 
 :System.Message_Level := '25';  
 -- 
 photo_filename := Get_file_name( null, null, 'Image File (*.GIF; *.JPG)|*.GIF; *.JPG|', null, open_file, true ); 
 -- 
 read_image_file(photo_filename, 'JFIF', 'bloco.foto'); 
 -- 
 if not form_success then 
  -- Mensagem de erro 
	 msg_alert('format of the invalid image','E',false); 
 end if; 
 -- 
 :system.message_level := 0; 
 -- 
end; 

and then it is only to make a normal query that will present The photo that was saved !!
Valeriar
Rank: Estagiário Júnior
Rank: Estagiário Júnior
Posts: 1
Joined: Thu, 06 Feb 2014 10:09 am

People, I include the Image Type Image in Forms, but at the time of consulting it gives this type of error

Select all

ORA-02303: cannot drop or replace a type with type or table dependents
the forms that I am using 32 bit v 5.0.6.23
I realized that the queries that I inserted with Forms 6, does not give this error, but also does not recover the image.
Do you know how I can get it right?
Thanks!
schnu
Rank: Analista Pleno
Rank: Analista Pleno
Posts: 110
Joined: Tue, 24 May 2005 9:16 pm
Location: Dongguan - Guangdong - China
Deus criou os loucos para confundir os sábios

Maybe it's your own version. In what I did I used version 6.0.8.26.0 version and never had this problem.

The field type is like BLOB ??
Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 18 guests