Home » Developer & Programmer » Forms » Message not displaying (10g developer suite, 10g ,win xp)
Message not displaying [message #328695] Sat, 21 June 2008 11:57 Go to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Hi,

My message is not displaying, I don't understand the reason why (attached is the screen shot). Here is the WHEN_BUTTON_PRESSED trigger

declare

	file_name varchar2(30) := name_in('FILE_NAME');		
begin
  	  
  message('This is the filename '||file_name);
  
end;


but when I press the button the contents of the text box (FILE_NAME) are not being displayed. Any guesses why?
  • Attachment: message.gif
    (Size: 55.90KB, Downloaded 115 times)
Re: Message not displaying [message #328713 is a reply to message #328695] Sun, 22 June 2008 02:05 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Sorry guys..Excuse for consuming your time figuring out the problem in the wrong direction. Actually the code I presented below is incomplete, here is the complete code

declare
  file_name varchar2(30) := name_in('FILE_NAME');
begin
  p1(file_name);
  message('This is the filename '||file_name);
  message(' ');
end;


Now the problem is that the control is transfered to the procedure (P1) and there it ends. This is why the next block is not being displayed. I tried to convert my procedure into function but it is not helping (below is the code).

create or replace function blob1(file_name varchar)
     return varchar
as
  a blob;
  loc bfile := bfilename('D1','''||file_name||''');
begin
  insert into das.pictures values(empty_blob())
  returning photo into a;
                          
  /*opening the location to load the file*/
  dbms_lob.fileopen(loc);                             
                                                                                                         
  /*loading into the blob variable which inturns loads into the table*/
  dbms_lob.loadfromfile(a,loc,dbms_lob.getlength(loc));

  /*closing the location*/
  dbms_lob.fileclose(loc);
  return 'TRUE';
end; 


Quote:
WHEN_BUTTON_PRESSED - modified


declare
  file_name varchar2(30) := name_in('FILE_NAME');
  get varchar2(20);
begin
  get := blob1(file_name);
  message('This is the filename '||file_name);
  message(' ');
end;



Can anyone tell why the control is not getting back to the form?



[Mod-edit: Frank removed trailing spaces in code-section which led to ridiculous formatting]

[Updated on: Tue, 24 June 2008 02:15] by Moderator

Report message to a moderator

Re: Message not displaying [message #337093 is a reply to message #328713] Tue, 29 July 2008 21:35 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Did you solve your problem?

David
Re: Message not displaying [message #337276 is a reply to message #337093] Wed, 30 July 2008 07:13 Go to previous message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
ooppss sorry..I should have mentioned here that I already solved the problem.

Actually it was a text literal error in this line

loc bfile := bfilename('D1','''||file_name||''');


Thanks for checking in..

Previous Topic: Problem in Form 6i to 10g
Next Topic: Understanding procedure for menu scrolling
Goto Forum:
  


Current Time: Sun Dec 04 16:53:45 CST 2016

Total time taken to generate the page: 0.07456 seconds