Re: Informix Online - Forms
Posted in 1998
pe@pre.datel-group.co.uk wrote: > > Hello All, hopefully quick question with easy answer! > > I have an informix form which is used to allow simple maintenance of a > table, at present this form works on Standard Engine and works on > various databases (all called data but in differect directories). So > the form can work in any of the databases just by having "database > data" in the form, and changing DBPATH according to the database you > wish to use. > > Now this system has been moved onto Online WGS and the databases are > now named, live_1, live_2, demo_1 etc. Is there a way of getting my > form to work now, i.e what "dababase ??" do I put in the form? P, if I recall correctly, all you need to do is run isql with the database name in the command line: isql {database} -fr {form name} As long as the tables and columns listed in the form exist in the named database, the for will run fine. The database name in the command line will override the database the form has been generated/compiled against. A bigger pain is if you want to run the Informix menu against several identical databases. Since rows that support the menu are inside the database it's kinda hard to navigate outside the database. One possible solution that just occurred to me (read: Not thought out yet) is to create the menu in one database and create aliases in every other database in the envioronment, referencing sysmenuitems and sysmenus in the database the menu was created it. As for running isql forms against a possible multitute of databases from the menu: Solution to that is multi-part: 1. Use an environment variable (like DBNAME for us FourGen weenies) to hold the name of the intended target database. Don't forget to export it. 2. In the menu item that lists a form (using the F designation). Forget the F; use P and the command line at that menu item would be: isql $DBNAME -fr form-name I hope I have correctly conjectured from your question the direction your environment was going. -- -- Jake (Retrospectively realizes there is no future in hindsight) +------------------------------------------------------------+ | The expedient performance of a task with excessive concern | | regarding its duration-to-completion engenders a virtual | | certainty of diminished benefit therefrom. | | -- Benjamin Franklin (but he said it in 3 words) | +------------------------------------------------------------+