Description
Performs a buffer copy from a source buffer to a target buffer using the specified field mappings to copy the data.
Parameters
ihSourceBuffer | input | handle | Handle to the source buffer from which the data is going to be copied. |
ihTargetBuffer | input | handle | Handle to the target buffer to which the data is going to be copied. |
icBufferFieldMapping | input | character | Comma delimited list of the field mappings between the buffers. It does not matter if the list is in <target-buffer-field>,<source-buffer-field> order or vice versa progress will automatically switch the fields depending on is the target and source buffers. |
icExcludeFields | input | character | Contains a comma delimited list of the fields that should not be copied by the from the source to the target. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/database.p)
assign
oiReturnStatus = -98.
ihTargetBuffer:buffer-copy(ihSourceBuffer, icExcludeFields, icBufferFieldMapping) no-error.
/*
* Log any errros that occured during the buffer copy processing.
*/
if error-status:error then do:
do viFcCount1 = 1 to error-status:num-messages:
<M-1 run SetMessage (input error-status:get-message(viFcCount1) (icMessage),
input '' (icArguments),
input '' (icFieldName),
input '' (icFieldValue),
input '' (icType),
input 3 (iiSeverity),
input string(ihTargetBuffer:rowid) (icRowid),
input '-1':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input 'DatabseComponent.MappedBufferCopy()':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in database>
end. /* do viFcCount1 */
/*
* Additional Error handling must be done here ?
*/
return.
end.
assign
oiReturnStatus = 0.