Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to control view updates
Message
 
To
26/11/2002 06:22:14
Victor Verheij
International Film Festival Rotterdam
Rotterdam, Netherlands
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00726867
Message ID:
00726875
Views:
12
>MyView is a local view. I've experimented with
>dbsetprop('MyView','view','sendupdates',.f.) and setting this property to .t. when I want the table to be udpated but with some unpredictable results.

You do not send updates to the remote table setting 'sendupdates' to .t., you have to set 'sendupdates'=.t. when you create the view, then your view works like a native-buffered-table and you must use

tableupdate() and tablerevert()

to send update or discard changes

'sendupdates' only means that the view is updatable

>Experiments with cursorsetprop() also didn't workout.

have you called:

CURSORSETPROP("UpdateNameList",....)
CURSORSETPROP("UpdatableFieldList",....)
CURSORSETPROP("KeyFieldList",....)
CURSORSETPROP("Tables",....)
CURSORSETPROP("WhereType",....)
CURSORSETPROP("SendUpdates",....)

ecc.?

>
>I've also noticed that the base table almost alway gets updated when i close the form that works with this view.

This because VFP automatically try to update when you close the table.
Also, if you have a row-buffered table VFP automatically try to update data when the record pointer is moved

The logic is
1) create the view
2) set the view to be updatable (using dbsetprop and cursorsetprop)
3) views now works like a VFP buffered table, and you have to tableupdate()/tablerevert()

HTH

Franco
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform