Hello,
here again to illustrate the speed (around 130โฏms).
Every change is written immediately to the DBF! USE ( ) โ CLOSE DATA
In the bottom right corner, you can see the beating heart, indicating that the microservice is active.
Worth mentioning: This displayed XBrowse web clone is simply called with xbrowse.html?db=DATABASE_PATH and DBF name โ and everything works just like on the desktop.
And the best part: This is where the microservice writes the data into the DBF โ really simple and robust!
The request file (JSON) is read using memoread(), and then:
Best regards,
Otto

here again to illustrate the speed (around 130โฏms).
Every change is written immediately to the DBF! USE ( ) โ CLOSE DATA
In the bottom right corner, you can see the beating heart, indicating that the microservice is active.
Worth mentioning: This displayed XBrowse web clone is simply called with xbrowse.html?db=DATABASE_PATH and DBF name โ and everything works just like on the desktop.
And the best part: This is where the microservice writes the data into the DBF โ really simple and robust!
The request file (JSON) is read using memoread(), and then:
if valtype( hReq ) != "H"
RETURN
endif
cAction := LOWER( hReq["action"] )
cDbf := hReq["databasePath"]
DO CASE
CASE cAction == "editrecord"
DoEditRecord( cDbf, hReq )
CASE cAction == "addrecord"
DoAddRecord( cDbf, hReq )
CASE cAction == "deleterecord"
DoDeleteRecord( cDbf, hReq )
ENDCASE
FERASE( cPath )
RETURN
//----------------------------------------------------------------------------//
PROCEDURE DoEditRecord( cDbf, h )
USE ( cDbf ) NEW ALIAS DATA SHARED
GOTO VAL( h["recordId"] )
IF !EOF()
DBRLOCK()
FIELD->&( h["columnName"] ) := h["newValue"]
DBUNLOCK()
ENDIF
CLOSE DATA
RETURNOtto
