Unsupported variable type

The Boolean data type cannot be transferred across Oracle Net. Therefore you need to convert it to and from another data type, for example an integer. If the boolean variable is an input/output parameter named "p1" for procedure "myprocedure", use a PL/SQL Block like this:

Code:
declare
  -- Boolean parameters are translated from/to integers:
  -- 0/1/null <--> false/true/null
  p1 boolean := sys.diutil.int_to_bool(:p1);
begin
  -- Call the procedure
  myprocedure(p1 => p1);
  -- Convert false/true/null to 0/1/null
  :p1 := sys.diutil.bool_to_int(p1);
end;

The :p1 variable would be an integer here. This example would be simpler if the parameter is just input or just output.
 
Back
Top