Re: Recursive Stored Procedures
Posted in 1994
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Jack Parker (jparker@hpbs3645.boi.hp.com) wrote: : Folks, : I was putting together a recursive stored procedure - things were going just : fine - then I popped a second window and used it again - while the : first one was still running. The engine crashed and I had to go through a : tbinit/restore to get it back. Anyone else ever see this? : (Online5.0, isql/4gl 4.10). : cheers : j. In my (past) experience, Informix has had problems with recursive routines when the routine requires I/O. For example I wrote a routine which opened a window and, depending on the user key presses, could be required to open a second instance of the same window. After closing the second instance, the program would crash because the first window instance seemed to think it had been closed. I don't think your problem is a reflection of the fact that you are using a stored procedure. My gut feeling is that is is something to do with Informix's internals (I know this is true for C versions because INPUT statements got (still get?) turned into "static" data structures which just doesn't work properly for recursive routines). My solution was grubby - when it went to open the window a second time it opened a different window with the same layout but used a different variable in a separate OPEN statement. I had to duplicate code though, which I wasn't too impressed about. Any comments Jonathon L? David.