Riebens Blog

Engaging Infinite Improbability Drive...

Runtime Errors

Posted by Benjamin Dell
Benjamin Dell
Benjamin Dell has not set their biography yet
User is currently offline
on Sunday, 04 December 2011
in Development Chat

Interesting Runtime Error – but the error did not display the line that was the cause of the error, but rather the preceding wlanguage line.


I tried to add a unicode string to an Integer type field (currrency), and it works, but then I tried to multiply the unicode string by 1000

so instead of having

UnderwriterProducts.InsuredAmount = IPproduct$.Insuredamt

I had

UnderwriterProducts.InsuredAmount = IPproduct$.Insuredamt * 1000

and the compiler was fine with it, but at runtime I got an error .. not on this line, but on

ValCompKey2 is string
ValCompKey2 = HBuildKeyValue(Under…
HReadSeekFirst(UnderwriterPro…
IF NOT HFound(UnderwriterProducts) THEN
----- HERE I GET THE RUNTIME ERROR

UnderwriterProducts.InsuredAmount = IPproduct$.Insuredamt * 1000

I changed the code to read

nLcAmount = IPproduct$.Insuredamt
UnderwriterProducts.InsuredAmount = nLcAmount * 1000


and the error at runtime disappears.

0 votes
Tags: Untagged
Benjamin Dell has not set their biography yet