Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique Primary Key Violation
Message
 
To
20/07/2001 15:57:16
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00533283
Message ID:
00533419
Views:
9
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...
Previous
Reply
Map
View

Click here to load this message in the networking platform