VoDbCommitAll Function |
Namespace: XSharp.RT
1FUNCTION Start() 2 LOCAL rddList AS _RDDLIST 3 aRdds := {"CAVODBF", "DBFNTX"} 4 n := ALen(aRdds) 5 rddList := MemAlloc( (_SizeOf(DWORD)) + (n * _SizeOf(SYMBOL)) ) 6 rddList.uiRddCount := n 7 FOR i := 1 TO n 8 rddList.atomRddName[i] := SysAddAtomUpperA(aRdds[i]) 9 NEXT 10 cLast := "Winston" 11 VODBUseArea(TRUE, rddList, "sales", "sales", TRUE, FALSE) 12 VODBOrdListAdd("SaleFNam", NIL) 13 VODBOrdListAdd("SaleLNam", NIL) 14 VODBUseArea(TRUE, rddList, "colls", "colls", TRUE, FALSE) 15 VODBOrdListAdd("CollFNam", NIL) 16 VODBOrdListAdd("CollLNam", NIL) 17 MemFree(rddList) 18 DBSelectArea("sales") 19 // Select "sales" workarea 20 IF (Sales->(VODBSeek(cLast))) 21 IF Sales->(Deleted()) .AND. sales(RLock()) 22 Sales->(VODBRecall()) 23 ? "Deleted record has been recalled." 24 ENDIF 25 ELSE 26 ? "Not found" 27 ENDIF 28 // Processing done, write updates to disk and 29 // close files 30 VODBCommitAll() 31 VODBCloseAll() 32 RETURN TRUE