Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Get Server Message on the Screen (GUI)

Status
Not open for further replies.

msnandan

Programmer
Apr 8, 2001
3
0
0
IN
Hi!

I have an question??? which has been asked in so many interviews..

The Question is...

How to Get Server Message on the Screen (GUI)


I have a stored procedure in which i wrote a message by using the command

for example ::
DBMS_OUTPUT.PUT_LINE(' Test');

This message i can see in SQLPLUS but i could like to show the message to USER from Oracle Forms (Developer 2000) .. ?

give me suitable solution for the above question???
 
You may try to use the same package (dbms_output), namely get_line, get_lines procedures.
 
Hi!
Can any one give an explain! how to use

DBMS_OUTPUT.GETLINE();
DBMS_OUTPUT.GETLINES();

Srinivasa Nandan
 
Ok, this is what you do with DBMS_OUTPUT.GET_LINE & GET_LINES. PS: If you forget the _ it isn't going to work...

DBMS_OUTPUT puts information in the buffer AND DISPLAYS IT WHEN EXECUTION TERMINATES WHEN USING PUT_LINE... GET_LINE and GET_LINES allow you to access the buffer prior to closure.

GET_LINE will retrieve single lines on request FROM the buffer whereas GET_LINES will retrieve multiple lines.

The prototype for GET_LINE is
DBMS_OUTPUT.GET_LINE( ret_val VARCHAR(255), status INTEGER);

The ret_val value will //always// be returned as a string, unlike put_line. This information will be everything in the buffer (placed there by PUT_LINE) up to the next new line marker.

The prototype for GET_LINES is
DBMS_OUTPUT.GET_LINES( lines OUT DBMS_OUTPUT.CHARARR, numlines IN OUT INTEGER);
You use it as you would GET_LINE but you need to instance a var for the DBMS_OUTPUT.CHARARR and then reference the instance, looping through the number of lines you want to pull back (NB lines is an IN OUT parm - it will notify you of exactly how many lines were retrieved in the event of shortfall).




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top