Subject | nested cursors in 1.5.x |
---|---|
Author | André Knappstein, Controlling |
Post date | 2009-06-17T12:35:58Z |
Hi Folks,
I still need to work with 1.5. (which also is a great server already,
btw!) due to legacy client code. Some more months and I'll be through,
hopefully.
Anyway, today I tried for the first time ever to use a nested cursor
more than 2 levels deep.
For
Select a.Field1, a.Field2 from ATable a into V1, V2
do
begin
For
Select b.Field1, b.Field2 from BTable b into V3, V4
do
begin
-- do something to generate output records
suspend;
For
Select c.Field1, c.Field2 from CTable c into V5, V6
do
begin
-- do something to generate more records
suspend;
end
end
end
(no "execute statement"s are included in this case).
After struggling to find the reason for very strange results, I
finally got the impression that results are just unpredictable as soon
as I am implementing the 3rd level, no matter what's in that 3rd
level.
Can this be true? Is that a known fact, if so: is it no problem in
2.1.x? Or is there no such problem even in 1.5.x and my procedure must
be wrong at some place?
Thanks in advance,
André
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beta Eigenheim- und Grundstücksverwertungsgesellschaft mbH
Hafenweg 4
59192 Bergkamen-Rünthe
Telefon: +49 2389 9240 0
Telefax: +49 2389 9240 150
e-mail: info@...
Amtsgericht Hamm Nr. B 420 || USt-IDNr.: DE 125215402
Geschäftsführer: Achim Krähling, Dirk Salewski, Matthias Steinhaus
I still need to work with 1.5. (which also is a great server already,
btw!) due to legacy client code. Some more months and I'll be through,
hopefully.
Anyway, today I tried for the first time ever to use a nested cursor
more than 2 levels deep.
For
Select a.Field1, a.Field2 from ATable a into V1, V2
do
begin
For
Select b.Field1, b.Field2 from BTable b into V3, V4
do
begin
-- do something to generate output records
suspend;
For
Select c.Field1, c.Field2 from CTable c into V5, V6
do
begin
-- do something to generate more records
suspend;
end
end
end
(no "execute statement"s are included in this case).
After struggling to find the reason for very strange results, I
finally got the impression that results are just unpredictable as soon
as I am implementing the 3rd level, no matter what's in that 3rd
level.
Can this be true? Is that a known fact, if so: is it no problem in
2.1.x? Or is there no such problem even in 1.5.x and my procedure must
be wrong at some place?
Thanks in advance,
André
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beta Eigenheim- und Grundstücksverwertungsgesellschaft mbH
Hafenweg 4
59192 Bergkamen-Rünthe
Telefon: +49 2389 9240 0
Telefax: +49 2389 9240 150
e-mail: info@...
Amtsgericht Hamm Nr. B 420 || USt-IDNr.: DE 125215402
Geschäftsführer: Achim Krähling, Dirk Salewski, Matthias Steinhaus