>I just discovered that one of my table has duplicate records. I am trying to know what is causing this.
>
>The application using it only has one place in the code where a record can be inserted. That is based on a condition. If the LOCATE is NOT FOUND, then I will INSERT INTO table.
>
>The code is like this:
>
>SELECT LOGIN
>LOCATE FOR NOMEMBER=lnNoMember AND NOCLIENT=lnNoClient
>IF FOUND()
> do something
> ELSE
> INSERT INTO LOGIN (NOMEMBER,NOCLIENT,...) VALUES (lnNoMember,lnNoClient,...)
>ENDIF
>
>
>So, assuming the insertion of the duplicated record is done from here, it means the LOCATE fails. If that is the case, it would be because of an index corruption.
>
>I was wondering if someone already had a situation like that. Or, if someone might have an idea what else can cause this.
Any chance it might be a multi-user issue? Are you explicitly FLOCK()ing the table prior to your INSERT?
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up