Subject RE: [firebird-support] nested cursors in 1.5.x
Author Michel Veerman
I've used at least 4 levels deep, so I would presume the error is in your code.

Kind regards,
Michel.


-----Oorspronkelijk bericht-----
Van: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Namens André Knappstein, Controlling
Verzonden: woensdag 17 juni 2009 14:36
Aan: firebird-support@yahoogroups.com
Onderwerp: [firebird-support] nested cursors in 1.5.x

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


------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links