Re: Ingres user count problem
Posted in 1993
In <21193259.17699.5206@zeus.eymsl.co.nz> oliverj@zeus.eymsl.co.nz (John Oliver) writes: >[ Article crossposted from comp.databases.ingres ] >[ Author was John Oliver ] >[ Posted on 17 Sep 93 03:48:38 GMT ] >Can any Informix guru out there solve this problem? >We needed a dynamic menu system for our Informix based application: dynamic >meaning the menu tree is stored in the database itself. This allows >modules to be added to the application without recompiling, the menu >structure to be changed on the fly etc. >However, Informix 4GL does not allow the CALL instruction with a variable >function name. The call-menu module however, needs to be able to invoke >another 4GL module without knowing its name at comile time. The obvious >solution is to do something like: > run "fglgo ",module_name >The problems with this are: > a) you get dozens of fglgo and shell processes lying around waiting > on their children and > b) you can only navigate from node to connected node on the tree; we > needed to be able to jump from/to any node. >OK, we wrote a caller function in C that simply exec's a new fglgo process, >supplying the required module name, i.e: > > execp("fglgo", module_name, 0); > >When such a processs terminates, it looks up it's parent in the menu tree, But you said that it wasn't necessarily called from its menu parent! Sounds confusing for the user to me! It should go back to the last menu visited, not the parent of the last module jumped to. IMHO you should pass the name of the menu to return to as a command line argument. >and invokes it in the same way. Of couse it doesn't tidy up the Informix >dbms session, but what the hell.... Oh really? >Right, everything's just peachy now.. but wait! If I jump between modules No it ain't. >15 times, the program crashes with an error claiming that the maximum >number of database sessions has been exceeded. Too true. >Apparently, when a new fglgo is exec'd, the dbms doesn't know that the old >one has died. What we need is a way of gracefully disconnecting from the >dbms before execing the new process. >Phew! OK, anybody got the no doubt blindingly obvious solution? >BTW/FWIW: we're running Informix 4.10, Turbo engine on RS6000/AIX3.2. sqlexit() is the "proper" way, but I don't know if it was there way back in Turbo 1.1. >___________________________________________________________________________ >John Oliver | >CORE Management Systems Ltd | This signature intentionally left bland. >oliverj@eymsl.co.nz | graeme -- Disclaimer: The author's opinions are his own, and not necessarily those of Pyramid Technology Ltd. or Pyramid Technology Inc. --------------------------------------------------------------------------- -m------- Graeme Sargent Voice: +44 (0)252 373035 ---mmm----- Senior Database Consultant Fax : +44 (0)252 373135 -----mmmmm--- Pyramid Technology Ltd. Telex: Tell who??? -------mmmmmmm- Farnborough, Hants GU14 7PL Email: graeme@pyra.co.uk --------------------------------------------------------------------------- We have the technology. The tricky bit is learning how to use it.