Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local Views deleting child records problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00194224
Message ID:
00194330
Vues:
26
In order to use views to update a table the table must have a primary key.

>Hi,
>
>I have a database containing a number of local views one of which is vContacts and another vJournal items. vContacts contains a unique idnum field and vJournal also has an idnum field to enable linking to the contact.
>
>I have a tabbed form, page 1 displaying contact information. When selecting page 2, journal entries, a requery() on the idnum is done on the vJournal view and the results displayed in a grid. All this is fine.
>
>I have an edit form to edit single journal entries, however, if I try to delete just one journal record for the contact all records are deleted with a resultant key error.
>
>My understanding is that when working in the vJournal (key-idnum) view, this contact may have 6 entries and if trying to delete just one record, VFP says this has an idnum of xxx, there are 6 records with this key, I can't distinguish which actual record to delete as they all have the same key, so bingo, delete them all.
>
>Is there any other way to delete just one record without setting up another unique counter and field in the vJournal view.
>
>Regards
>Doug Johnston
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform