Page 1 of 1

Ayuda con FW_DbfToJson

PostPosted: Thu Jul 27, 2023 2:08 am
by devwin2010
Buenas Noches

Alguien tiene un ejemplo de uso de FW_DbfToJson

muchas gracias

Fabian

Re: Ayuda con FW_DbfToJson

PostPosted: Thu Jul 27, 2023 3:52 am
by Cgallegoa
Fabian:

Code: Select all  Expand view
#include "FiveWin.ch"

REQUEST DBFCDX

Function main()
   LOCAL hJSon, hFile
   
   RddSetDefault("DBFCDX")
   
   USE d:\fwh\samples\customer.dbf ALIAS "Cust"

   hJson := Cust->(FW_DbfToJson())
   hFile := FCreate( "_Resp.json" )
   FWrite(hFile,hJSon)
   FClose(hFile)
   
   HB_JsonDecode(hJSon, @hJSon)
   xBrowse(hJSon,"hJSon")
   
   dbCloseall()
Return(nIl)