I am trying to create a primary key for my table out of the following index called "keydex" :
custid+upsino+DTOS(puldat)+STR(sampleno,2)
however, it keeps telling me the "uniqueness of the index is violated." The field "sampleno" is the unique identifier for the records in the database. I know the sampleno does not exeed 2 digits and is incremented correctly by a value of 1 for each duplicate record. I am running the following code to determine which records are causing me problems:
function checkit
lparameters cDataTable
close tables
use (cDataTable) order keydex
go top
STORE SPACE(35) TO cCandidate
DO WHILE .NOT. EOF()
cCandidate=EVALUATE(SYS(14,4))
SKIP
IF EVALUATE(SYS(14,4))=cCandidate
BROWSE
ENDIF
ENDDO
The "keydex" is the 4th index tag in the table. The browse window never comes up, indicating to me that it never encounters a duplicate record based on the four fields in the index. So why is the index not unique?
Thank You
Elgin Rogers