Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update view or table through form
Message
From
06/03/1998 14:53:26
David Wang
Sullivan Environmental Consulting, Inc.
Alexandria, Virginia, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00082798
Message ID:
00083110
Views:
26
>>>>>I have a wizard form which is based on a view. The view was based on two tables. I added new records through this form. But the new record
>>>>>would disappear if I reenter the form.
>>>>>I put codes in the init even of the form which is based on view.
>>>>>The codes were:
>>>>> 'set multilocks on
>>>>> =cursorsetprop('buffer',5)'
>>>>>
>>>>>I thought this would take care the buffer problem. But it still would not save my new records . How can I correct it?
>>>>
>>>>By writing CURSORSETPROP("buffer", 5) you are turning buffering on. You need to issue a TABLEUPDATE(0,.T., "tablename") to comit the and write the change to disk.
>>>>
>>>>Ed
>>>
>>>Thanks ED. But where should I put the code? Form's init events?
>>>
>>>David
>>
>>No. You will want to call TABLEUPDATE() after you enter/modify your data and wish to comit the buffers. You may want to place this code as a result of a Click() event in a Save button, in a Deactivate() event in a form or page, or in the LostFocus() event of a field. The choice is yours; it just needs to be done sometime after you made your changes. If you buffered the view rather then the table, you will need to do your TABLEUPDATE() on the view, not the table. I couldn't tell from your code what you were buffering.
>>
>>Ed
>
>Ed & David, since the TableBuffering is set to 5, TABLE buffering, you'll need to call TableUpdate(1,.t.,'tablename') to force ALL updated rows to save.
>
>HTH


Thank you both.

David
Previous
Reply
Map
View

Click here to load this message in the networking platform