Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update Error with Insert and not Append
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00205593
Message ID:
00205873
Vues:
16
Charles,
Have you added records with both Append Blank and Insert during the same test and then compared them? If they look the same and you do a tableupdate() on all records are there still differences?

What happens if you do a replace on your primary and foreign keys - if you put the data in 'by hand' will it save correctly? None of this is appropriate for a final app but it might help you find the cause of your problems.

HTH
Barbara

>Hi All:
>
>When I add a group of records to a View using the INSERT INTO command I get an update error when issuing a TABLEUPDATE(). If I do the same using the APPEND BLANK command it works fine. The error is a primary key violation.
>
>The VIEW is setup with a call to a function that generates a primary key in the default property and since it is based on a child table, in another default property it gets the Parents key. I have all fields marked as updateable in the View, including the key fields.
>
>The problem lies in the update. The values in the VIEW's default fields(generated Parent and Foreign keys) do not get passed back to underlying table even though they appear to be there when I browse the VIEW. However, the remaining fields do.
>
>Again, this does this only happens when I use the INSERT INTO command.
>
>Any Ideas?
>
>Thanx,
>Charlie
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform