Re: Setting database at runtime with 4GL
Posted in 1995
Andy Kent (akent@cix.compulink.co.uk) wrote: : > A DATABASE statement at the top of a 4GL source is a declarative : > statement. A DATABASE statement *after* a MAIN or FUNCTION statement : is : > an executable statement : Not quite. The declarative one *also* gets executed. So as I understand ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Only if it is declared in the same module as MAIN. If so, the named database is opened during program initialization. If not, the program begins execution without a database. In that case, the named database need not exist on a runtime system at all. : it a database with the same name as the declarative one also has to exist : on the runtime system, even if it's completely empty on that box. On the : development system it would have to contain as a minimum any tables/ : columns referenced by DEFINE..LIKE. -Jeff