When I try to set the param's length in to 3 it jumpes to 4. The code changing the param's length in a cycle, multiple times,
We recently upgraded both IDE and ODAC, our code was working under XE3-ODAC pro 8.6.11, but not working under XE7-ODAC pro 9.6.20.
Code: Select all
// oracle datatype:
// TYPE t_table_of_number IS TABLE OF NUMBER INDEX BY PLS_INTEGER;
for i:= 1 to 5 do
begin
stoDemoSP.ParamByName('i_table_ids').Length := i;
// here is the anomaly, i = 3, but stoDemoSP.ParamByName('i_table_ids').Length jumpes to 4
stoDemoSP.ParamByName('i_table_ids').ItemValue[i] := (i * i);
end;
i <= 1
FDataPtr := [param_value] > 1 item
i = 2
FDataPtr := VarArrayCreate([0, 1], varVariant); [0..1] > 2 items
i >= 3
VarArrayRedim(FDataPtr, [param_length]); > [0..3] > 4 items!
should be
Code: Select all
FDataPtr := VarArrayCreate([1, 2], varVariant); [1..2] > 2 items
VarArrayRedim(FDataPtr, [param_length]); > [1..3] > 3 items
Code: Select all
FDataPtr := VarArrayCreate([0, 1], varVariant); [0..1] > 2 items
VarArrayRedim(FDataPtr, [param_length - 1]); > [0..2] > 3 items