The code is similar to the following:
dim dalHoldPosition as HoldPositionEntity '** The entity
dim fred as new dataset
fred.readxml(.....)
dim trans as new transaction(IsolationLevel.ReadCommitted, "Import")
for each dr as datarow in fred.tables(0).rows
dalHoldPosition = new HoldPositionEntity
if dalHoldPosition.FetchUsingPK(Convert.ToInt64(pidrData("HPOS_IDENTIFIER")), _
Convert.ToDateTime(pidrData("HPOS_VERSION_START_DATE"))) Then
Else
dalHoldPosition.HPOS_IDENTIFIER = Convert.ToInt64(pidrData("HPOS_IDENTIFIER"))
dalHoldPosition.HPOS_VERSION_START_DATE = Convert.ToDateTime(pidrData("HPOS_VERSION_START_DATE")))
End If
if convert.tostring(dr.item("HPOS_TITLE")) = "" then
dalHoldPosition.HPOS_TITLE = "Not passed"
else
dalHoldPosition.HPOS_TITLE = convert.tostring(dr.item("HPOS_TITLE"))
end if
'** .... other statements that pass each data item value, or a manipulated value, or a default value into the entity
trans.add(dalHoldPosition)
dalHoldPosition.save
next
Instead of the last 3 lines above, have tried with little difference:
colHoldPositions.add(dalHoldPosition)
next
trans.add(colHoldPositions)
colHoldPositions.savemulti
Didn't bother with the recurse on either save as the target table has no child tables.
I forgot to mention that I am attacking an Oracle db through ODP, and using SelfService.