Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View won't update table
Message
From
04/04/2000 14:57:36
 
 
To
04/04/2000 13:55:01
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00355076
Message ID:
00355168
Views:
23
Hi Peter,

I'm relatively new to views compared to most, so I think I can identify with your problem. In addition to what John said, you also have to use dbsetprop() for a number of other attributes. You need to indicate which fields are updatable, what the updatenames are if they vary from the select names, and all the key fields of the tables being pulled. I usually have a huge string of dbsetprop() commands after my select statement (if you're doing it programmatically) - a dbsetprop("fieldname","field","updatable",.t.) for each field which you want updated. Also, I do a dbsetprop("fieldname","field","updatename","database!table.field") for most of my updatable fields.

Also, another issue I've encountered is it seems important as to the timing of when you issue a cursorsetprop("sendupdates",.t.). I usually set all the database properties when I define the view, except sendupdates. Then I wait till I use the view to issue the sendupdates, and use cursorsetprop (rather than dbsetprop) to issue the command. I notice that if I don't do "sendupdates" before making any changes to the view, the changes don't seem to go through.

From my limited experience, it's worth struggling through getting the view working - it's a gratifying experience and then life is so much easier and more comfortable than using the tables.

I hope this helped.

Take care,

David
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform