manojchhaya
Member
Hello All,
Please help me. I want to re-use same code for two database having same structure. I try these steps but not working.
Step 1: Create 2 copies of the sports database with different
physical names, for example testdb1 and testdb2.
Step 2: Connect a session to one of them, using the logical
name x:
pro testdb1 -ld x
Step 3: Create the following program and save it as up.p.
/* up.p */
FIND FIRST x.customer.
UPDATE x.customer.name.
Step 4: Compile and save up.p as follows:
COMPILE up.p SAVE.
Step 5. Exit the Progress editor, and start again, connecting
the 2 databases, the first with logical name aaa, and the
second with logical name bbb.
pro testdb1 -ld aaa testdb2 -ld bbb
Step 6. You can now access both databases with the up.p code as
follows:
CREATE ALIAS x FOR DATABASE aaa.
RUN up.p.
DELETE ALIAS x.
CREATE ALIAS x FOR DATABASE bbb.
RUN up.p.
But this shows an Error of Ambiguity.
Because the Customer table exists in both the database.
Please help me.
Regards
Manoj Kumar
Please help me. I want to re-use same code for two database having same structure. I try these steps but not working.
Step 1: Create 2 copies of the sports database with different
physical names, for example testdb1 and testdb2.
Step 2: Connect a session to one of them, using the logical
name x:
pro testdb1 -ld x
Step 3: Create the following program and save it as up.p.
/* up.p */
FIND FIRST x.customer.
UPDATE x.customer.name.
Step 4: Compile and save up.p as follows:
COMPILE up.p SAVE.
Step 5. Exit the Progress editor, and start again, connecting
the 2 databases, the first with logical name aaa, and the
second with logical name bbb.
pro testdb1 -ld aaa testdb2 -ld bbb
Step 6. You can now access both databases with the up.p code as
follows:
CREATE ALIAS x FOR DATABASE aaa.
RUN up.p.
DELETE ALIAS x.
CREATE ALIAS x FOR DATABASE bbb.
RUN up.p.
But this shows an Error of Ambiguity.
Because the Customer table exists in both the database.
Please help me.
Regards
Manoj Kumar