Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Key field not updating.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00761947
Message ID:
00762351
Vues:
15
Ken,

The default value of the underlying table will not be called if the Primary key field is
marked as updated in the view. It will simply write the value found in the view to the table. When using views the best way to handle primary keys is generating the ID when adding a record to the view.

>I've had this happen before but cannot remember when or why it happens.
>
>I have an updateable view where the primary key field for the underlying table has a default value function to create a new key. When I insert a new record the key field in the view gets a new value. But when I TableUpdate the view all the fields in the underlying get the value from the view except the key field which remains blank.
>
>I have set the Send SQL Update property on the view and marked all the fields for update including the key field and also marked the key field as the key (obviously).
>
>Strange thing is this method appears to work on other views and tables but doesn't on this one for some reason.
>
>One thing I thought was that it had to do with the field being a primary key in the underlying table but setting it to regular or eliminating it all together doesn't have any effect.
>
>Any help is appreciated,
>
>ken
Heavy Metal Pedal - click with care
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform