Hey all,
I am trying to write a program that can work in two different possible environments. One has 2 databases available db1 and db2 for example. The other environment only has db1 available. Below is some code to try to explain what I would ideally like to happen:
Thanks in advance for any help.
I am trying to write a program that can work in two different possible environments. One has 2 databases available db1 and db2 for example. The other environment only has db1 available. Below is some code to try to explain what I would ideally like to happen:
Code:
DEF VAR l-var1 AS INT NO-UNDO.
DEF VAR l-var2 AS LOG NO-UNDO.
IF NOT CONNECTED(db2) THEN:
FORM
"ENTER INFO " l-var1 SKIP
"ENTER INFO2 " l-var2 SKIP
WITH FRAME framea.
UPDATE
l-var1
l-var2
WITH FRAME framea.
END.
ELSE:
FIND db2.table1 NO-LOCK NO-ERROR.
/* There is only ever 1 record in table1 */
ASSIGN
l-var1 = table1.field1
l-var2 = table1.field2
.
END.
Thanks in advance for any help.