Re: sqlexit()
Posted in 1997
Mike Segel wrote: > > Art S. Kagel wrote: > > > > Rich Sedman wrote: > > > > > > Hi, I havn't been following this group so sorry if this has already been > > > covered or is in the faq. Anyway, I need to disconnect from a database > > > and server in 4gl 6.0 and above (online and SE) so that I can bring the > > > server down. I've found reference to a function sqlexit() but this > > > doesn't seem to exist. 'close database' doesn't quit the sql process > > > either. Anybody come across this before or got any better ideas how I > > > can do the equivalent of a 'disconnect all' in 4gl. [SNIP] > This kinda falls into the "Whydcha wanto dothat" (Why do you want to > do that) catagory. > > Implicitly, you want to connect to the informix engine if you > have a 4gl Program. So why would you want to have a 4GL program > without a connection to the engine? The way I read the original post he wants to be able to tell an application to disconnect from the engine gracefully so that the engine can be bounced. I presume that he will send the application another message, somehow, to have it reconnect either to another server or to the same server once it has been resurrected. For this he will also need a wrapper for the sqlstart() function but that is another subject. > IMHO, I don't think that it is possible. Anyone take the time > to walk through the C code generated by the 4GL preprocessor? The preprocessor just generates ESQL/C code (indeed the second pass of 4GL is just an ESQL pass). Whatever you can do in ESQL you can do in 4GL so this is not a technical problem. I've done this particular one myself.