Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate primary key values in table
Message
De
05/03/2002 18:06:51
 
 
À
05/03/2002 17:57:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00628704
Message ID:
00628768
Vues:
18
>How are you generating the numbers?
>
>>>Have you checked for DELETED() records?
>>>
>>
>>Yes, I should have mentioned in my initial post - both rows are active (not deleted) That is, the row that is supposed to have ID 7 (but was changed to 13) is not deleted. Nor is the row that is supposed to have ID 13 (and still has 13).

I should also mention that, according to the audit trail, neither record was ever deleted.

I use a Primary Key table that has the last Id value used for each table. The default value of the key fields calls a stored procedure, SP_IDNEXT, which looks up the tablename in my Primary Key table, locks the appropriate row, increments the value, Unlocks the row and then returns the new id.

Also, the tables (and method of assigning IDs) has been in place for years - since VFP3. This has become an issue only in the past several months. I'd guess there are around 150 entries in the Primary Key table (ie. around 150 tables. This is the only table that has this problem.)

Thanks,
Alan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform