by hua » Fri Jun 19, 2020 6:06 am
Using Harbour+FWH1912, the following sample will at 1st run generates RTE and subsequent runs will see empty records added. Why?
- Code: Select all Expand view
#include "fivewin.ch"
function main()
local oDb
field dref
if !file("hua.dbf")
dbCreate("hua.dbf", {{"dref", "c", 12, 0}})
endif
oDb := TData():open(, "hua.dbf",,.t.)
select (oDb:cAlias)
index on dref to hua temporary
oDb:append()
oDb:dref := time()
oDb:save()
xbrowse(oDb)
return nil
class TData from TDatabase
method open(cAlias, cDbf, cDriver, lShared) inline ::super:open(cAlias, cDbf, cDriver, lShared)
method append() inline (::cAlias)->(myAppend())
endclass
function MyAppend()
append blank
return nil
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour