Home » Developer & Programmer » Forms » DBMS_OUTPUT with own forms window
DBMS_OUTPUT with own forms window [message #85137] Fri, 04 June 2004 03:56 Go to next message
hudo
Messages: 165
Registered: May 2004
Senior Member
How can I output with forms for example the current record number, or the value of the background color etc to a own window ? This should only be during the developing phase to help/see/control the values of some interesting variables.
Re: DBMS_OUTPUT with own forms window [message #85152 is a reply to message #85137] Fri, 04 June 2004 11:19 Go to previous message
Tak Tang
Messages: 142
Registered: May 2004
Senior Member
Create a multi-line text item - ctl.output (2000 chars).

Make a call to DBMS_OUTPUT.ENABLE().
Make your database call.
Retrieve the output from DBMS_OUTPUT using :-

DECLARE
  l_status NUMBER;
  l_line   VARCHAR2(255);
  l_buffer VARCHAR2(2000);
BEGIN
  l_buffer := '';
  DBMS_OUTPUT.GET_LINE(l_line, l_status);
  WHILE (l_status = 0) LOOP
    l_buffer := l_buffer || CHR(10) || l_line;
    DBMS_OUTPUT.GET_LINE(l_line, l_status);
  END LOOP;

  :ctl.output := l_buffer;
END;
Previous Topic: Coping from one data block to another data block (Urgent plz.)
Next Topic: take a 'snapshot' of the system before and after installation
Goto Forum:
  


Current Time: Mon Jul 08 15:27:22 CDT 2024