Re: using environment value in DATABASE statement
Posted in 1995
In article <46p030$lj4@natasha.rmii.com>, scdickey@corbsys.com (Stephen C. Dickey) wrote: >I am trying to connect to a specific database that is defined in an >environment variable called "DB_NAME". > >The following syntax gives a compiler error saying fgl_getenv is not a >database. > >DATABASE fgl_getenv("DB_NAME") [snip] This won't work for the database statement in the header of the program but you can use this for the database statement in the body of the program. I think you're doing something very similar to what my application does (access identical databases under different names). The database statement in the header can't contain the variable but you can put it in the program. DATABASE test_db MAIN CLOSE DATABASE DATABASE fgl_getenv("DB_NAME") ..... END MAIN Gary Mitchell mitch@lexmark.com