Re: 4GL and $DBNAME
Posted in 1998
On Wed, 24 Jun 1998 13:50:12 +0100, Stefan Weideneder <stefan@weideneder.de> wrote: >Nils Myklebust wrote: >> There is a significant problem with this: The database statement in >> the source module that contains the main-function have the added >> effect of including an open of that database in the code before >> anything else is executed. Using the above code both the >> "compilerdatabase" and the dynamically set database would have to be >> present at runtime. Even if they allways are you get an additional >> open (or connect) to the compilerdatabase that isn't needed. >> > >Hi Nils, > >the significant problem is: Informix opens the compiler-database >by default. There should be an option to avoid the open at runtime. I see absolutely no need at all for such an option. What's the big issue with: module1.4gl: # No database statement main defer interrupt defer quit call xxx_startup() end main module2.4gl: database compilerdatabase function xxx_startup() # Do whatever your program is intended to do. # Start by connecting to whatever database you want to use # that has the same structure as the compilerdatabase. end function One extra small module containing only the main function shouldn't be a significant problem to gain exactly the same benefits as such an option would give you. > >Have a nice day :-)) Same to you. Nils Myklebust NM Data AS Norway E-mail: Nils.Myklebust@nmdata.com FAQ at: http://www.iiug.org/techinfo/faq/faq_top.html (Now with ODBC info under "Third party products".)