Description
General procedure to read data from the database into the class dataset.
The data is stored into the temp-tables referred by a handle in tFcDynRel.
Parameters
tDynRel | input | temp-table | Description of the data to read. |
ihClass | input | handle | Handle to the class that is using the persistence layer. In most of the cases, this handle will be available in the preprocessor {&TARGETPROCEDURE}. |
oiReturnStatus | output | integer | |
Internal usage
unused
program code (program1/other.p)
/* Clean up the garbage */
for each tBufferFields where
not valid-handle(tBufferFields.thTempBuffer):
delete tBufferFields.
end.
for each tDynRel where
tDynRel.tcFcFrom = "":
<M-1 run ReadDataRecursive (input tDynRel.tcFcTo (icTableName),
input tDynRel.thFcBuffer (ihDestinationBuffer),
input tDynRel.thFcIBuffer (ihIDestinationBuffer),
input tDynRel.tcFcRel (icPrepare),
input '' (icParentRowid),
input true (ilTopLevel),
input ihClass (ihClass),
output oiReturnStatus (oiReturnStatus)) in other>
empty temp-table tRowidList.
if oiReturnStatus <> 0 then return.
end.
if can-find (first tDynRel where tDynRel.tcParent <> "")
then do:
<M-2 run UpdateParent (output oiReturnStatus (oiReturnStatus)) in other>
end.