Alaska Software Inc. - Duplicate key, key not unique indexing error
Username: Password:
AuthorTopic: Duplicate key, key not unique indexing error
Tim CallahanDuplicate key, key not unique indexing error
on Sat, 01 Jun 2019 10:26:47 -0700
I am encountering an indexing error in code that has been working for
a very long time.
The code creates a table with the DBFCDX driver and then indexes it.
I have tried to research this error with no luck.
Any help is greatly appreciated!

The code is:

aStru := {}
aadd(aStru, {'date','D',8,0})
aadd(aStru, {'account','C',5,0})
aadd(aStru, {'department','C',5,0})
aadd(aStru, {'amount','N',11,2})
dbusearea(.t.,'DBFCDX','adp_summ.dbf','adp_summ', .f.)
index on dtos(date)+account+department to adp_dad

The error is:

oError:args         :
          -> VALTYPE: C VALUE: adp_dad.CDX
          -> VALTYPE: C VALUE: dtos(date)+account+department
          -> VALTYPE: B VALUE: {|| dtos(date)+account+department}
          -> VALTYPE: U VALUE: NIL
oError:canDefault   : Y
oError:canRetry     : Y
oError:canSubstitute: N
oError:cargo        : NIL
oError:description  : Duplicate key, key not unique
oError:filename     : 
oError:genCode      :         96
oError:operation    : DbCreateIndex
oError:osCode       :          0
OS error message    : The operation completed successfully.
oError:severity     :          2
oError:subCode      :       8999
oError:subSystem    : BASE