IBDac 2.70.0.43
Delphi 2009
I have some code
Code: Select all
procedure loadPoints(aDs : TIBCQuery);
var
fbArray : TIBCArray
ptKount : Integer
ptsArray : Variant
begin
...
fbArray := aDs.GetArray('POINTS');
ptKount := aDs.FieldByName('NUMPOINTS').AsInteger;
ptsArray := fbArray.GetItemsSlice([1, 2, 1, ptKount]);
...
the first line of code fails when looping through the dataset when the number of array entries exceeds the first time fbArray is set.
For example
On the first pass (1st record in ds) there are 6 array elements to identify
On the Second pass (2nd record in ds) there are 4 array elements to identify
On the Third pass (3rd record in ds) there are 10 array elements to identify.
It is at this 3rd point I get an exeption error message:
When I check the fbArray High Bounds property, it is 150 which is what I would expect for my app.Array high bound out of bounds (10)
I suppose I am doing something wrong

Please can you advise how to do this properly.
Thanks and regards
SeaCay