On Apr 7, 11:41, David Tsang wrote: > I have an on-line application (6.4/06) with two databases, > an active and an archive one. > > I have written a database switcher in ESQLC. > > ..... > My questions are: > > 1. I RTFM and couldn't find anything in them about > session -1. In fact the SQL man specifically says that the > session identifier must be a positive number. Is there any > doco on this and where can I find it. Session -1 is the session that FRS establishes for itself, the default session. It is a multisession connection, in the sense that additional CONNECTs are allowed. By the way, if your databases are true mirrors of each other from a structural standpoint, you can disconnect and reconnect session -1 in your esql/c routine and dispense with the additional session. The only restriction we've run into when trying this is that all session switching has to be done from the initial application image, if your app consists of multiple executable images. > 4. What is this startup session used for. I suspect just > startup and shutdown of the app. fetching forms, abf record type data, etc. any sort of FRS stuff. It may also come into play during CALL. > 5. Is it possible to startup the app without a session. not in 6.4. You can in OpenIngres; however, a lot of FRS "stuff" doesn't work when you do. In 6.4, if I wanted an app to start without a session, the closest I could come was to start it connected to iidbdb. You still have a session but at least you're not counting on any particular database. > 6. Is it possible to disconnect from all sessions and have > none but still remain in the app and if so. I suspect not as > the information obtained in the startup session would be > lost. You can disconnect session -1 from your esql/c routine, but I imagine that the FRS will become quite pissed off at you eventually. If all your forms are compiled in you might get away with it; i've never really tried. OpenIngres's 4GL CONNECT support is much easier to use, by the way. Its only downside is that you can't reconnect the FRS connection without resorting back to the esql/c trickery. -- Karl Schendel Phone: (412) 963-8844 Telesis Computer Corp Fax: (412) 963-1373 wiz@telesismfg.com
© William Yuan 2000
Email William