Re: DB Definition Reference
Posted in 1996
Dennis J Pimple writes: * Srinivas Reddy wrote: * > You can avoid using the hard coded database name by replacing it by * > ENVIRONMENT variable DBNAME. * > * > You may have to change little bit of code to accept the database name * > from DBNAME. * > * > If I get time I will try to give you an example. * > * * I don't think so. I'll bet none of the following work outside of a * FUNCTION (the DATABASE declaration is at the top of the module, for * compiling reasons): * * DATABASE DBNAME * * DATABASE $DBNAME * * DATABASE fgl_getenv("DBNAME") All you need to do is to have the DATABASE databasename statement in the GLOBALS module. All other modules, just include the GLOBALS "globals.4gl" at the top to get the database to compile against. Also, just have the MAIN, END MAIN in a seperate module that doe NOT include either DATABASE or GLOBALS statements. That way, you only need to change the dabatase name in one place. What's the BIG deal. Thanks, ----------------------------------------------------------------------------- Robert Minter Data Systems Support Senior Software Engineer A Client Technologies Company E-Mail: rob@dssmktg.com Tel: 714.771.0454 Fax: 714.771.3028 #include <std_disclaimer.h> http://www.dssny.com