BLOB Fields
If you are copying a record that contains a BLOB field, you must calculate the BLOB field before it can be copied with the rest of the record.
IF Mytable.BLOB.HASVALUE THEN
Mytable.CALCFIELDS(BLOB);
My own experiments with NAS programming indicate that HASVALUE requires a CALCFIELDS (at least when a bitmap is stored in them).Thanks very much. Putting CALCFIELDS before checking HASVALUE did the trick. Silly ommision on my part.
Thanks to kriki too for achieving that in another way.
Regards,
NVG
Comments
Unfortunately in 5.01 Build 26084 you do need to use a Calcfield before a HASValue.
2009 No need for Calcfield before a HASValue...
Both give the same result....
Item.FINDFIRST;
REPEAT
Item.CALCFIELDS (Picture);
IF Item.Picture.HASVALUE THEN
MESSAGE ('(%1)', Item."No.");
UNTIL Item.NEXT = 0;
//No need for Calcfield
Item.FINDFIRST;
REPEAT
IF Item.Picture.HASVALUE THEN
MESSAGE ('(%1)', Item."No.");
UNTIL Item.NEXT = 0;
Hope this helps