Buffer-value Assignment Error (630)

davidvilla

Member
Hi All,
I am getting a error (630) when assigning a buffer-value for a temp-table field which is defined like the source table. But, when I assigne the value to a static variable, I am not getting the error. Below is the code snippet.

Code:
define temp-table ttdata
fields cphnnbr like customer.cphnnbr initial "".

define variable cphone like customer.cphnnbr initial "".

define variable bhTT as handle.
define variable bhtable as handle.

find first customer no-lock where custid = "xxxx" no-error.
bhtable = buffer customer:handle.

create ttdata.
bhTT = buffer ttdata:handle.

bhTT:buffer-field("cphnnbr"):buffer-value = bhtable:buffer-field("cphnnbr"):buffer-value.

cphone = bhtable:buffer-field("cphnnbr"):buffer-value.

message ttdata.cphnnbr cphone.

The field customer.cPhnNbr is defined as CHARACTER with format "~(9(3)~)9(3)-9(4) ~e~x~t X(4)".
The value in the customer.cPhnNbr field is "770/9893705" (which is a bad data :()

The ttdata.cphnnbr and cphone are defined similar to the source field customer.cPhnNbr.
The line
Code:
bhTT:buffer-field("cphnnbr"):buffer-value = bhtable:buffer-field("cphnnbr"):buffer-value.
is giving me the error "** Character / at position 4 must be digit. (630)".
Whereas when assigning the value to a variable,
Code:
cphone = bhtable:buffer-field("cphnnbr"):buffer-value.
it works fine. No error.
In both cases, the value is getting stored in the target.

Why does assigning to a temp-table buffer handle behaves differently than the variable assignment?

Any help on this will be appreciated.
I am using OE11.5 on a HP-UX platform.

Thanks.
 
Last edited by a moderator:

Stefan

Well-Known Member
Maybe to keep it simpler, assigning the invalid value to the static temp-table field also does not complain (ie behaves the same as a variable)
 
Top