Hi everyone
After some testings and adapting the code to xharbour, I just receive an error in a windows message box:
"hb_xrealloc can't reallocate memory."
With this text written in the console:
Unrecoverable error 9009: Unrecoverable error 9011: hb_xrealloc can't reallocate memoryhb_xfree called with a NULL pointer Called from INDEX1(49)Called from INDEX2(0)
Called from ORDCREATE(0)Called from ORDCREATE(0)
Called from INDEX1(49)Called from INDEX2(76)
The code:
*
request dbfcdx
proc main()
? "Start thread 1:", seconds()
StartThread(@index1())
return
*
function index1()
local start_time:=seconds(),elap_time
ferase ('his_jude.cdx')
ferase ('his_jude1.cdx')
use his_jude exclusive new via 'dbfcdx'
index on STR(NRO_DEUDOR)+DTOS(FECHA) tag 'GJE_DEUDOR' to 'HIS_JUDE'
index on STR(NRO_DEUDOR)+EST_CARTA+DTOS(FECHA)+LEFT(TELEFONO,13) tag 'GJE_DEUETA' to 'HIS_JUDE' additive
index on FECHA tag 'GJE_FECHA' to 'HIS_JUDE1'
index on ARCHIVOCAM+str(NRO_DEUDOR)+left(TELEFONO,13) tag 'GJE_ARCHIV' to 'HIS_JUDE1' additive
index on ID_BML tag 'GJE_IDBML' to 'HIS_JUDE1' additive unique
use
elap_time := seconds()
? "End thread 1:"+time()+" seconds:"+str(elap_time-start_time)
return nil
And no index created.
If it is so difficult to build a simple index, I can't use MT in any other process.
Don't want to have a headache, so my simple solution: starting a couple of external programs from inside the application to pack and build indexes using shellexecute().
Regards
Claudio Voskian