Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems deleting records
Message
De
04/08/1998 11:04:21
 
 
À
04/08/1998 10:57:26
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00123753
Message ID:
00123798
Vues:
25
>>>I've got a form (VFP 5.0) with a grid displaying IT contacts in an organization. The grid's columns are position/title, first name, last name, phone etc and come from a view. I've got an Add button that calls another form in which the user can select a position and person from drop down lists which is then added to the main form's grid, and a Delete button which deletes the current record in the grid.
>>>
>>>When I first call up the form I can delete records from the grid just fine. I can also add them fine. But if I add a record to the grid *then* try to delete any record in the grid, the records are not deleted.
>>>
>>>I've been checking all my code to make sure the view is requeried and the form is refreshed, but can't seem to figure out why this is happening. Without me posting all my code up here, does anyone have any ideas of where I could be looking to solve this problem?
>>>
>>>MTIA!
>>>Mandy
>>
>>Two questions:
>>1) Do you delete/add to view or to underlined table?
>
>I both delete and add to the underlying table, not the view. Then I issue "=requery('myview')" and grid Refresh commands to update the view.
>
>>2) Is inderlined table buffered?
>In the main form where I delete records from the base table, the BufferOverrideMode is set to 1 for all associated tables/views.
>
>In my "Add a new contact" form, the BufferOverrideMode is set to 4. In the form's Init method, I add a blank record with a new key field value and default values in the other fields. Then when the user has selected a person and position from my dropdown boxes for the new record I issue a:
> =tableupdate(1,.t.,"contacts") command
>to update the table.
>
>I'm not incredibly sure how buffers work. Could this be my problem??
>
>Many thanks!
>Mandy

Firstly, the more natural way is to work (add/delete records to view). Also, BuffermodeOverride=1 just indicates that DE objects inherit buffering mode from Form.BufferMode setting, so check what you have there. Also, BufferModeOverride=4 (pessimistic table) is awfully awkward for real multi-user interface.
Normal setting is following: table-buffered view and non-buffered underlined table.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform