project BLF > class Persistence (other) > method UpdateBufferInfo

Description

Keep handles to class temp-tables and their fields, to speed up reading and writing.


Parameters


ihDestinationBufferinputhandleHandle to the buffer of the temp-table that contains the components data.
ihIDestinationBufferinputhandleHandle to the buffer of the temp-table that contains the components optimistic lock data.
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


BLF
method other.ReadDataRecursive
method other.WriteData


program code (program1/other.p)

assign oiReturnStatus = -98.

if not can-find (first tBufferFields where
                       tBufferFields.thTempBuffer = ihDestinationBuffer)
then do viFcCount1 = 1 to ihDestinationBuffer:num-fields:

    assign vhDField = ihDestinationBuffer:buffer-field(viFcCount1).
    if vhDField:help = "Calc#":U then next.
    
    create tBufferFields.
    assign tBufferFields.thDestinationField  = vhDField
           tBufferFields.thTempBuffer        = ihDestinationBuffer
           tBufferFields.tcFieldName         = vhDField:name
           tBufferFields.thIDestinationField = ihIDestinationBuffer:buffer-field(tBufferFields.tcFieldName).
end.

assign oiReturnStatus = 0.