General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only