I an using this code to create my indexes
- Code: Select all Expand view
- function Maintmod(oMainWnd,cPath)
local oDb,oIndex
oIndex := tdatabase():new(,cPath + "indfile")
if oIndex:use()
do while ! oIndex:eof()
CursorWait()
oDb := tdatabase():new(,cPath + alltrim(oIndex:datafile))
if oDb:use()
oDb:pack()
oDb:CreateIndex(alltrim(oIndex:datafile),alltrim(oIndex:tagname),alltrim(oIndex:key),if(!empty(oIndex:cond),alltrim(oIndex:cond),))
endif
oDb:Close()
oIndex:skip()
enddo
oIndex:Close()
SysRefresh()
CursorArrow()
endif
return(nil)
The indexes are created but the when I use an index with a for condition (oIndex:cond) it does not work according to the condition.
Regards
Colin