Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Gotcha of the Day
Message
 
 
To
12/03/1999 15:14:00
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00196963
Message ID:
00196979
Views:
24
>Hi All ---
>
>Just spent 5 hours obsessing over why a really complex view was not updating. Finally hit me: No KeyField defined. So, the Tip of the Day is: When creating updateable views via PRG code, ENSURE you specify a key field with DBSETPROP in the same code.
>
>Or, Tip #2, don't be as stupid as me :-D

#4 (Ed' was #3). Remember to make the Key Feild updatable as well if you intend to add new records as well. I forgot that once, and I was able to add exactly 1 new record before I got a PK Field duplication error. Of course this was before I started using a stored procedure to generate the PK and a added a function call for the default value of the PK field.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform