I am not able to use them, in my program I have all area in numbers.
look this code:
- Code: Select all Expand view RUN
proc main()
local cArq:="test",i
LOCAL t1 := hb_milliSeconds(), t2
FERASE( cArq+".dbf" ) //
dbSelectArea(2)
dbCreate( cArq, { { "ITEM", "N", 10, 2 },{ "RAND", "N", 10, 2 },{ "TESTO", "C", 10, 0 } } )
USE (cArq)
dbSelectArea(1)
t2 := hb_milliSeconds()
? "Database creation: " + str(t2-t1) + "msec"
t1 := t2
for i:=1 to 100000
(2)->(dbAppend())
(2)->ITEM := i / 100
(2)->RAND = hb_Random(100)
(2)->TESTO = hb_randStr(10)
next
t2 := hb_milliSeconds()
? "100.000 fields in " + str(t2-t1) + "msec"
t1 := t2
dbSelectArea(2)
INDEX ON STR(FIELD->RAND,6,2)+STR(FIELD->ITEM,6,2) TAG "ITEST"
OrdSetFocus( "ITEST" )
DBGOTOP()
t2 := hb_milliSeconds()
? "index in " + str(t2-t1) + "msec"
t1 := t2
WAIT "Press a key..."
browse(2)
close
return
Our program is like this, but spread in about ten source files.
I tried to convert it with HB_DBCreateTemp, but without success, if I try it with "ARRAYRDD" is slower.