Proc*C Cursor Question
From: Dave Bornstein <davidb_at_dma.isg.mot.com>
Date: 1996/06/20
Message-ID: <31C98307.3007_at_dma.isg.mot.com>#1/1
}
EXEC SQL CLOSE mess_cur;
}
Date: 1996/06/20
Message-ID: <31C98307.3007_at_dma.isg.mot.com>#1/1
Using the call: find_children(100,0);
EXEC SQL FETCH mess_cur into :currId; printf("(%i) %i\n",indent, currId); find_children(currId, indent+1);
}
EXEC SQL CLOSE mess_cur;
}
The results I am getting are:
(0)100
(1)101
(1)101
(1)101
... Forever.
Obviously, the original cursor mess_cur is not being replaced with the
new host variable in the subsequent calls of find_children. I need to
use some kind of recursive function because any Message may have any
amount of children, and each child can have any amount of children.
Does anyone know of a way to either fix the above problem, or suggest a different implementation alternative?
Thanks in Advance.
Dave Bornstein
Motorola ISG
davidb_at_dma.isg.mot.com
Received on Thu Jun 20 1996 - 00:00:00 CEST