Oracle9iAS Portal Developer Kit

set_value_as_number procedure

Contained in package wwpre_api_value.

Call this procedure to set a number value for a preference.

procedure set_value_as_number

(

p_path in varchar2,

p_name in varchar2,

p_level_type in varchar2,

p_level_name in varchar2,

p_value in number,

p_commit in boolean default FALSE

);

Version: Oracle Portal 3.0.6.6.5 or later

Parameters:

p_path

The path for the preference name.

Datatype: in varchar2

p_name

The preference name.

Datatype: in varchar2

p_level_type

A constant value for the level at which the value is stored.

Datatype: in varchar2

p_level_name

The user name or group name for the value to be stored.

Note: If the level type is SYSTEM, then level name must be NULL.

Datatype: in varchar2

p_value

The number value to be stored.

Datatype: in value

p_commit

This parameter is now obsolete. It is left here only to ensure that when older code is used, it still compiles.

Exceptions:

  • If the value is not a number, VALUE_ERROR_EXCEPTION is raised.
  • If the path is not found, PATH_NOT_FOUND_EXCEPTION is raised.
  • If a duplicate path is found, DUPLICATE_PATH_EXCEPTION is raised.
  • If the name is not found, NAME_NOT_FOUND_EXCEPTION is raised.
  • If a duplicate preference name exists for the specified path, DUPLICATE_NAME_EXCEPTION is raised.
  • If the value has not been stored, GENERAL_PREFERENCE_EXCEPTION is raised.

Example:

This example sets the font size to 10 at the system level.

begin

  wwpre_api_value.set_value_as_number

(

p_path => 'ORACLE.PORTAL.TEST.STYLE.DEFAULT',

p_name => 'FONT_SIZE',

p_level_type => wwpre_api_value.SYSTEM_LEVEL_TYPE,

p_level_name => null,

p_value => 10

);

 

exception

when VALUE_ERROR then

dbms_output.put_line

(

'Trying to set invalid value'

);

end;

Related topics

The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio