Re: Problem with data entry on form

"James B. Byrne via Aubit4gl-discuss" <[email protected]> Thu, 4 Feb 2021 10:59:49 -0500
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <[email protected]>

On Thu, February 4, 2021 10:51, James B. Byrne via Aubit4gl-discuss wrote:
> This is from exercise 7 of Informix4GL by Example.  When I try to enter a value
> in the unit price field then I get this error:
>
> "You must enter a unit price. Please try again."
>
> The program code where this happens is:
>
> Program
> ####
> GLOBALS
>   DEFINE
>           gr_stock  RECORD
>             . . .
>             unit_price        LIKE stock.unit_price
>   END RECORD
>

>
> There is not much going on here.  I cannot see why the value returned from the
> screen is null?  Given that the value is set to a non-null value before the
> field is displayed I do not understand how that is replaced by a null in any
> case.
>
> What am I missing?
>

Apparently, Aubit4GL does not like the PostgreSQL MONEY type.  If I replace:

unit_price        LIKE stock.unit_price

with

unit_price        DECIMAL(16.2)

Then the problem does not occur.

-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
   Unencrypted messages have no legal claim to privacy
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:[email protected]
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3