Hi All,
Any ideas why this would be? - not a problem but just curious
Yesterday I merged two of my databases. DB main had 44 Panels & DB secondary
had 27 panels. I wanted to extend DB main to include some of the panels in
the 2nd DB and thought I'd save some time by not re-inventing the wheel and
"simply" merge the two. This was done with DPexp of both and using a text
editor changing all panel references in the 2nd database to what would be
their new panel numbers in the merged DB. That is, panel 1 became panel 45
panel 2 became panel 46 etc and all panel link references were also changed
to the new numbers. Copy and pasted the panel section of the No.2 Ste into
the correct place in the Main Ste file, Copied the data files required from
the 2nd DB dir to the Main DB directory .(No txx file in the 2nd DB to worry
about). And then a DPimp into the main DB (copy of :-).
Opened the new merged database, recreated indexes and its up and running.
(Once again reinforcing to me the genius of Lew)
Both databases contain calculation panels (the main has two and the 2nd one
only one calculation panel). Fortunately the2nd DB had limited formulas on
fields in the calculation panel. I knew the formulas would need to be
changed and the panels and field references in formulas corrected for the
formulas to continue to work in the merged database.
eg Calculation Panel in DB2 was panel 2. It is now Panel 46 in the new
database. But it still had formulas referring to P3F13, P2F2 etc etc
Here is part of a formula on one field
P2F2 CASES
CASE CV = " " OF
round[(((P2F8P7F6P8F2*P2F8P7F8)+P2F13P7F7P9F2)*1.62);0.5] ENDOF
CASE CV = "SS" OF IF P2F4 > 0 AND P2F4P4F3 = "S" THEN
round[(((P2F8P7F6P8F2*P2F8P7F8)+P2F8P7F7P9F2)*1.48);0.5] - 4
ELSE IF P2F4 > 0 AND P2F4P4F3 = "M" THEN
round[(((P2F8P7F6P8F2*P2F8P7F8)+P2F8P7F7P9F2)*1.52);0.5] - 4
ELSE IF P2F4 > 0 AND P2F4P4F3 = "N" THEN
round[(((P2F8P7F6P8F2*P2F8P7F8)+P2F8P7F7P9F2)*1.48);0.5] - 4 - 5
ELSE round[(((P2F8P7F6P8F2*P2F8P7F8)+P2F8P7F7P9F2)*1.48);0.5]
etc etc
This is the original formula with reference to Panel 2 - The panel 2 links
should all need changing to Panel 46 etc
But here's the mystery..... all the formulas in their original format still
produce the correct result in the merged database. As expected ALT-F3 on
any fields in the formula show they are now linked to the wrong fields in
the wrong panels - but they somehow are giving the correct results.
There is no way I could leave it like that so I am correcting all formulas
to how they should be, like so....
P46F2 CASES
CASE CV = " " OF
round[(((P46F2P51F6P52F2*P46F2P51F8)+P46F2P51F7P53F2)*1.62);0.5] ENDOF
CASE CV = "SS" OF IF P46F4 > 0 AND P46F4P48F3 = "S" THEN
round[(((P46F2P51F6P52F2*P46F2P51F8)+P46F2P51F7P53F2)*1.48);0.5] - 4
ELSE IF P46F4 > 0 AND P46F4P48F3 = "M" THEN
round[(((P46F2P51F6P52F2*P46F2P51F8)+P46F2P51F7P53F2)*1.52);0.5] - 4
ELSE IF P46F4 > 0 AND P46F4P48F3 = "N" THEN
round[(((P46F2P51F6P52F2*P46F2P51F8)+P46F2P51F7P53F2)*1.48);0.5] - 4 - 5
ELSE round[(((P46F2P51F6P52F2*P46F2P51F8)+P46F2P51F7P53F2)*1.48);0.5]
etc etc
But I'd sure like to know how the original formulas can possibly still
work??? - What am I missing - Any ideas out there?
Regards
Colin Roberts
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf