$page_title = $titlebar_text; $header_bar_text = $titlebar_text; ///////////////////////////////////// // get header include('rlib_header.php'); // print << Oracle UTL_LMS Version 11.1  
General Information
Purpose Retrieves and formats error messages in different languages
Source $ORACLE_HOME/rdbms/admin/utllms.sql
Dependencies
DBMS_SERVER_ALERT DBMS_UNDO_ADV UTL_LMS_LIB
Special Characters
Character Description
'%s' Substitute the next string argument
'%d' Substitute the next integer argument
'%%' Represents the special character %
 
FORMAT_MESSAGE

Formats a retrieved error message
utl_lms.format_message(
format IN VARCHAR2 CHARACTER SET ANY_CS,
args   IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL)
RETURN VARCHAR2 CHARACTER SET format%CHARSET;
set serveroutput on

DECLARE
 s VARCHAR2(32767);
 i PLS_INTEGER;
BEGIN
  i := utl_lms.get_message(26052,'rdbms','ora','french', s);

  dbms_output.put_line('before format, message is: ' || s);

  dbms_output.put_line('formatted message is: '||
  utl_lms.format_message(s, 96, 'my_string'));
END;
/
 
GET_MESSAGE

Retrieves an error message based on error number, product, facility, language, and message specified
utl_lms.get_message(
errnum   IN  PLS_INTEGER,
product  IN  VARCHAR2,
facility IN  VARCHAR2,
language IN  VARCHAR2,
message  OUT NOCOPY VARCHAR2CHARCTER SET ANY_CS)
RETURN PLS_INTEGER;
set serveroutput on

DECLARE
 s VARCHAR2(200);
 i PLS_INTEGER;
BEGIN
  i := utl_lms.get_message(601, 'rdbms', 'oci', 'German', s);
  dbms_output.put_line('OCI--00601 is: ' || s);
END;
/
 
Related Topics
Exception Handling
  EOM; ///////////////////////////////////// // get footer include('rlib_footer.php'); ?>