2010. november 22., hétfő

"Nonsense" error message "parameter mismatch for procedure"


Problem/Question/Abstract:

When I called a stored procedure from a trigger, I got a seemingly wrong error message "invalid request BLR at offset yyy, parameter mismatch for procedure XXX" but the passed parameters were fine.

Answer:

The solution is to handle the return value.
See the sample code below..

// this one does not work:
//  execute procedure update_petrochemical_feedstocks (1800024, 2001);

// this one does work:
declare variable v_sd integer;
declare variable v_fp integer;
declare variable v_ar integer;
begin
  select * from update_petrochemical_feedstocks(1800024, 2001)into: v_sd, : v_fp, : v_ar;
end

Nincsenek megjegyzések:

Megjegyzés küldése