I've found something within my code that doesn't make sense.
I have the following code:
Code: Select all
if Upper(cDatapath)==cTESTDIR
oKmTabel := Dbserver{"F:IC2TEST"+"KMTab16mp.adt", true, false, "ADSADT"}
else
oKmTabel := Dbserver{cTracePad+"KMTab16.adt", true, false, "ADSADT"}
endif
oKmtabel:SetOrder("KM1")
Within this code, we make a DbServer object using the SetOrder method as the controlling order.
I've looked into This post states that "If oServer is declared as DataServer then the method SetOrder is not available. So this will not compile." Robert 2018-12-07 11:03:01
But it does compile but leads to crashes upon calling the SetOrder method.
Now my solution that works for this problem is subclassing the DBServer class which still INHERITS from DBServer but magically works.
Can somebody explain to me why using the SetOrder method directly on a DBserver object doesn't work?
Frank