Subject Re: Re[2]: [firebird-support] nested cursors in 1.5.x
Author Vlad Khorsun
> The abstract of the turnkey is like this:
> For
> Select a.Field1, a.Field2 from TheTable a where a.x=3D:y into :V1, :V2
> do
> begin
> -- send the main row to output
> output1 =3D :V1;
> output2 =3D :V2;
> suspend;
>
> -- look in same table for n rows belonging to main row
> For
> Select b.Field1, b.Field2 from TheTable b where b.IDProcess =3D :V2
> into :V3, :V4=20
> do
> begin
> output1 =3D :V3;
> output2 =3D :V4;
> suspend;
> end
> end
>
> output1/output2 are the returning values/output parameters.
>
> The error is in the values of output1/output2 in the 2nd cursor.
> For each row of the 2nd cursor they do NOT have the values :V3/:V4 of
> the inner cursor's position, but :V1/:V2 (of the outer cursor's
> position)

Are you sure inner cursor produced records ?

Regards,
Vlad