Re: Changing the database at runtime
Posted in 1996
I'm not sure this is what you looking for. Can you create dummy database call db_schem with schema only (no data). And, db_data1 with the all the data. In your programs, set database to look at the db_schem database then change to db_data1 database. DATABASE db_schem MAIN DEFINE db_name CHAR(100), var1 LIKE table1.var1 ... ... .. LET db_name = argv(1) OPEN db_name .. .. .. END MAIN When you run this 4gl program, pass in database name. fglgo my4gl db_data1 ______________________________ Reply Separator _________________________________ >Subject: Changing the database at runtime >Author: INTERNET:estheka@vigoro.vigoro.com at CSERVE >Date: 4/9/96 6:40 PM > > >Sender: informix-list-owner@rmy.emory.edu >Received: from rmy.rmy.emory.edu (rmy.rmy.emory.edu [170.140.97.4]) by >arl-img-3.compuserve.com (8.6.10/5.950515) > id TAA28683; Tue, 9 Apr 1996 19:39:50 -0400 >Received: (from ilist@localhost) by rmy.rmy.emory.edu (8.7.1/8.7.1) id >TAA02687 for susik_lee@united#u#group.ccmail.compuserve.com; Tue, 9 Apr 1996 >19:40:08 -0400 (EDT) >From: Hemant Karmarkar <estheka@vigoro.vigoro.com> >Message-Id: <Pine.PTX.3.91.960409153118.17105A-100000@vigoro.vigoro.com> >Subject: Changing the database at runtime >Date: Tue, 9 Apr 1996 15:39:20 -0300 >Reply-To: Hemant Karmarkar <estheka@vigoro.vigoro.com> >Organization: STARnet, L.L.C. >Sender: informix-list-owner@rmy.emory.edu >To: informix-list@rmy.emory.edu >X-Informix-List-To: susik_lee@united#u#group.ccmail.compuserve.com >X-Informix-List-Id: <news.22925> We have an accounting database having more than 200 tables. Now the same software is to be run for another comapny, so we thought of creating a seperate database for the new company and running the same set of programs by just changing the DBNAME variable. But informix does not allow to run the same programs unless you issue a database stmt. Does anybody know any way to run the same set of programs without any change for new database ?