Hello,
To use CDX instead of NTX, is the better option.
If you open a database, the CDX-Index is opend as well.
I use ORDCREATE and ORDCONDSET
-------------------------------------------
Sample 1 :
Old Style :
------------
Index on upper(archiv_no) + DESCEND(str(n_year) + str(n_month)) to "FAKT1" UNIQUE
New Style :
( .T. included in the Index-array means UNIQUE )
----------------------------------------------------------
ORDCREATE( ,"FAKT1","LOWER(archiv_no) + DESCEND(str(n_year) + STR(n_month)", ;
{|| LOWER(archiv_no) + DESCEND(str(n_year) + STR(n_month) } , .T. )
-----------------------------------------------------------
-----------------------------------------------------------
Sample 2 :
// Index-direction Down = .T.
Old Style
-----------
Index on DESCEND(str(n_year) + invoice_no + archiv_nr) ;
to "FAKT3" UNIQUE
New Style
------------
ORDCONDSET( , , , , , , , , , , .T. ) // DESCEND
ORDCREATE( ,"FAKT3","STR(n_year) + invoice_no + archiv_no", ;
{|| STR(n_year) + invoice_no + archiv_no } , .T. ) // UNIQUE
Be careful, to use soemething like : UPPER(Name)
In case of < ÖÄÜ > at the beginning of the name, it doesn' work.
You have to use LOWER !!!!
Regards
Uwe
