Re: Closing OnLine session
Posted in 1997
Thanks for your information. I've just discovered that there is supposed to be a built-in 4GL function called SQLEXIT in v6 (Reference Volume 2 Pg 4-83). This is exactly the function we need. Unfortunately, there's a small hitch - it doesn't work. A runtime error - function does not exist - is all one gets instead. Now what? Apply for a refund? Maestro(?), can you check whether this function works for you? With reference to your suggestions, Jonathan, I'm not very clear - does it mean that without the ESQL/C product, I'm still up the creek without a paddle? (I don't find fglsys.h in $INFORMIXDIR or sub-directories) TIA. Rudy At 09:29 AM 4/30/97 -0700, you wrote: <snip> } }Several pieces of information: } }(1) Version 6.0x I4GL understands precisely the same SQL syntax as 4.1x } I4GL, the 4.10 engine syntax. CONNECT is too recent (6.00 upwards) to } be part of the SQL it understands, despite what the version numbers } suggest. } }(2) I posted some ESQL/C code to allow I4GL program to use CONNECT and } friends via a set of function calls. Check in the IIUG archives } (http://www.iiug.org) for the source code. } }(3) There is another function, sqlexit(), which can be used to terminate } database connections. It is, however, an ESQL/C function, not an I4GL } function. You'd have to have some C code in your I4GL to use it: } } /* uncompiled, but should be OK! */ } #include "fglsys.h" /* declares fgl_fatal() */ } int i4gl_sqlexit(int n) } { } if (n != 0) } fgl_fatal("i4gl_sqlexit", 1, -1318); } sqlexit(); } return(0); } } } }(4) DISCONNECT only works with 6.00 and later servers, whereas sqlexit() } works with earlier versions too. } }>It does look like it works under ESQL (Why this discrimination?), so }>maybe your menu program has to be written in C. }> }>Let me know if you find a 4GL solution to this problem which I face }>as well. } }Yours, }Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> } }