Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Uniqueness of index violation
Message
 
À
09/09/1997 13:22:36
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00049180
Message ID:
00049193
Vues:
50
>I have a problem that I can't for the life of me figure out. I have a form that is used to register people for classes. There are (among other things) five text boxes that define the class (i.e.-year, class, section, term, period). I enter values for these five fields (all bound to the same table) and then call another form (seems to be irrelevant which one). The second form has nothing in its DataEnvironment. After closing the second form, I retype the value in the Year field (re-entering the same value) and call the second form again. When closing the second form, the program crashes on the following line of code in the Activate of the first form:
>
>go iif(this.nRecNum>0,this.nRecNum,reccount("classfile")) in classfile
>
>The error message is "Uniqueness of index STUDENT is violated."
>
>Relevant info:
>1) this.nRecNum= -1 (for new record)
>2) The Primary index STUDENT is on AccountNum+Year+Term+Sequence# (for !deleted())
> (The seq# is not generated until record is saved. At this point it is blank.)
>3) The BufferMode is set to 5 - Optimistic Table
>4) No tablerevert or tableupdate is issued yet.
>5) There are no other records in the file for this Account Number.
>6) There is only one appended new record.
>
>Why am I getting this error when there is really no violation?
>
>Any help would be greatly appreciated.
>
>Elyse

better (IMO) to assign the sequence number when creating the record. This will take care of that problem.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform