Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Uniqueness of index violation
Message
From
11/09/1997 09:44:47
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00049180
Message ID:
00049509
Views:
73
>>>>>>>>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
>>>>>>>
>
>Elyse, another thought, since noone else has reproduced your problem: Check all of the stored procedures and referential integrity for your tables and see if one of the links there is causing these problems.
>
>Barbara

There are no stored procedures or RI.

Elyse
Elyse Pomerantz
Previous
Reply
Map
View

Click here to load this message in the networking platform