Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
"Malcolm Weallans" — — source: Informix-list mailing list archive (1991-1998)
Mike is basically correct. But you do need source! and the database
defined at the beginning of the MAIN module MUST exist. Otherwise you
get a -329 Database not found or no system permission error.
Another possible easier mechanism, which would only work with SE would be
to have the two databases with the same name in different paths and use
DBPATH to swap between them.
With OnLine version 5 you could get the same effect by having two
separate instances and choose between them using TBCONFIG.
> Its easy in 4gl,
> You still need a "database dbname" at the top - so pick one.
> Then in the main section you could have something like
>
> let w_dbname=fgl_getenv("DBNAME")
> let w_prepstr="database ",w_dbname
> prepare p_id1 from w_prepstr
> execute p_id1
>
> all you need to do to change databases is to issue another
> "database dbname"!
>
> (Make sure you dont have any cursors or transactions open or anything
> like that. I have had some trouble in the past with that type of thing!)
>
>
>
> --
> Mike Aubury _\\?/_
> |O O|
> +----------oOOO-\\_/-OOOo---------+-----------------------------+
> | Heisenberg may have been here | mike@aubury.demon.co.uk |
> +--------------------------------+-----------------------------+
>
Malcolm Weallans
Online Database Consultancy
Phone 01628-72154
Fax 01628-37463
CIX - onlinedbc
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.