Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Begining questions on Forms 4.5
In article <ABsMQXq8R5_at_yamb.ygaz.tyumen.su>,
nfo_at_yamb.ygaz.tyumen.su wrote:
> 1. How to change a name of the application (in heading of a window)?
> By default: Developer/2000 Forms Runtime for Windows 95/NT
> It is necessary: My Program Name
> In the documentation is specified, that is possible to change only
> one property for
> SET_APPLICATION_PROPERTY (property, value)
> CURSOR_STYLE = BUSY, CROSSHAIR, DEFAULT, HELP, INSERTION
Depending on which window title you want to set, you use one of the two
lines here: Set_Window_Property(Forms_MDI_Window,Title,'My Program
Name'); Set_Window_Property('WINDOW0',Title,:Parameter.Form_Title);
> 2. The messages from the stored proc in SQL*PLUS are shown on the screen
> with the help DBMS_OUTPUT.PUT_LINE ('my message').
>
> As similar to make in Forms:
>
> Trigger WHEN-BUTTON-PRESSED
> BEGIN
> MY_PROC; - contains DBMS_OUTPUT.PUT_LINE ('my message ').
> ???
> ???
> ???
> END;
I use a Key-F2 trigger. Here is the trigger that I keep to insert into
any form where I need to use DBMS_OUTPUT.
------------------------------------------- -- Key-F2 Trigger Display DBMS_OUTPUT lines --* -- Requirements to run this process: -- 1. Copy DBMSOUTPUT window and canvas to a form. -- 2. Copy this trigger into aform. -- 3. Copy the Block named DBMSOUTPUT from the AAKEEP form into -- the form where it is needed. -- To uninstall this stuff in your form: -- Delete the following: -- This trigger -- DBMSOUTPUT block -- DBMSOUTPUT canvas -- DBMSOUTPUT window -- -- Note: To use this trigger, it must be run once first just to run -- the following enable command, or the enable command must be -- coded prior to calling the procedure where dbms_output is -- used. Enable command: dbms_output.enable(20000);
Declare
Sts Integer; txt varchar2(300); cntr Integer := 0;
Procedure Display_Output is begin
dbms_output.get_line(txt,sts); if sts=0 then foundlines := true; if cntr = 0 then clear_block; else next_record; end if; cntr:= cntr+1; :dbmsoutput.txt:=txt; else if cntr=0 then :dbmsoutput.txt := ' No DBMS Output lines available.'; cntr := 1; else first_record; end if; exit; end if;
Procedure Create_Sample_DBMS_Output is begin
Begin ------------------------- Main Process ---------------------------dbms_output.enable(20000);
Go_item('DBMSOUTPUT.NAV_HIDDEN');--causes dbmsoutput canvas to display
If not form_success then
MESSAGE(' go_item(''DBMSOUTPUT.NAV_HIDDEN'') Failed');
raise form_trigger_failure;
end if;
If Get_Block_Property('DBMSOUTPUT',Status)<>'NEW' then
Message(' Clear block (shift-F5) first to see new output');
else
Display_Output;
IF not foundlines then
Create_Sample_DBMS_Output; Display_Output; Message(' No DBMS_Output lines available, so sample messages ' ||'have been created.');
/*
Include the following code in the form, just before the display or
commit process--whichever calls the procedure that uses dbms_output.
The DBMSOUTPUT Block contains two items: Nav_Hidden a hidden, navigable item (but txt could be navigable) Txt char(300) displayed item
The DBMSOUTPUT Block contains a post-block trigger with:
HIDE_VIEW('DBMSOUTPUT');
This causes the form's main canvas to re-display.
*/
Regards,
Steve Cosner
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Thu Dec 04 1997 - 00:00:00 CST
![]() |
![]() |