Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Primary Key Violation
Message
 
À
20/07/2001 15:57:16
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00533283
Message ID:
00533419
Vues:
10
Hi John,

Exactly right!

My base table key field's default value was a "key=key+1" function called when new records are appended.

I thought that when new records were appended to the base table from the updatable view, with zero as the key value, the function could set the new key values in the base table at that point.

Evidently that was too late in the game.

I moved the function into a class, added it to the data entry form, and used it to set the key field value on the form (in the view) BEFORE executing tableupdate() to update the underlying table.

It works great!

Im still not sure why there was a problem being that the underlying table was empty, therefore there was no 'Unique Primary Key' to 'violate'. Anyway...

Thanks for your help. That was just enough to send me in the right direction...

Regards,

Todd
The day you take complete responsibly for yourself, the day you stop making any excuses, thats the day you start to the top. - O.J. Simpson

Great advice from a questionable source...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform