Re: Connect String in ESQL/C
Posted in 1996
ANSI SQL does not have a DATABASE statement -- in fact, it really didn't recognise the possibility of multiple databases until SQL-92. Anyway, the CONNECT statement is the new construct and is more powerful and flexible than the old DATABASE statement which is still recognised, primarily for backwards compatability reasons. The CONNECT statement is not required for either SE or OnLine, but can be used with either or both. With the CONNECT statement, you can have multiple connections open at one time, and you can switch between those connections, so you can talk concurrently with an SE system and an OnLine system, possibly with transactions in both. The DATABASE statement can also be used with either, but not with both at the same time -- you have to close the current database (finishing any transactions before doing so) and then open another database to switch databases with the DATABASE statement. You have to use either a DATABASE statement or a CONNECT statement to get access to a database. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> >From: "Tom Best [Bentley]" <tom.best@bentley.com> >Date: Fri, 16 Feb 1996 10:34:00 -0500 >X-Informix-List-Id: <news.21312> > >What is the difference between the "CONNECT TO" stmt and the "DATABASE" statement? >I'm looking at pages 1-78 and 1-198 respectively - in the Informix Guide to SQL >Syntax 7.1, for the descriptions of these commands. Is the "CONNECT TO" syntax >required for Informix Online, and the "DATABASE" syntax is available for use with >SE? Or is it so one can connect to a server, then connect to different databases >on that server?