Description
This method retrieves a temp-table handle and store the data of the temp-table to database.
Parameters
| ihBankImportLines | input | handle | handle of Bank Import Line |
| icParentRowid | input | character | Parent Row ID |
| iiBankImpID | input | integer | Bank Import ID |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program3/bbankimportline.p)
/* ================================================================= */
/* This method retrieves a temp-table handle and store the data */
/* of the temp-table to database */
/* ================================================================= */
assign oiReturnStatus = -98
vhBankImpLineBuf = temp-table tBankImpLine:handle:default-buffer-handle.
create query vhQuery in widget-pool "non-persistent".
vhQuery:add-buffer(ihBankImportLines).
vhQuery:query-prepare("for each ":U + ihBankImportLines:table + " by BankImpLineSeq").
vhQuery:query-open().
vhQuery:get-first(no-lock).
/* Go through the temp-table and store records to DB dataset */
repeat while not vhQuery:Query-Off-End:
<M-5 run AddDetailLine
(input 'BankImpLine':U (icTable),
input icParentRowid (icParentRowid),
output viFcReturnSuper (oiReturnStatus)) in BBankImportLine>
vhBankImpLineBuf:find-by-rowid(rowid(tBankImpLine)).
vhBankImpLineBuf:buffer-copy(ihBankImportLines, 'tc_Rowid,tc_Status,BankImpLine_ID,BankImp_ID':U).
assign tBankImpLine.BankImp_ID = iiBankImpID.
vhQuery:get-next(no-lock).
end.
if oiReturnStatus = -98 then assign oiReturnStatus = 0.