Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems deleting records
Message
From
04/08/1998 10:57:26
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, United States
 
 
To
04/08/1998 10:21:10
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00123753
Message ID:
00123793
Views:
21
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform