Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local Views deleting child records problem
Message
 
To
04/03/1999 17:02:31
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00194224
Message ID:
00194330
Views:
24
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
Previous
Reply
Map
View

Click here to load this message in the networking platform