General information
Title:
View does not update a field in base table
Below is code that creates a view. When editing the view through a browse window all field edits get send back to the base table except for the field incidents.employeeid. For some reason this field is not updated to the base table. What is even stranger is that if in the select statement below the parameters
'left outer join data1!employees ;
on incidents.employeeid = employees.employeeid'
are moved to the bottom of the command then this field will get updated. But then the field incidents.jobtitleid ceases to update.
The rule here seems to be that the field involved in the first join condition never gets any updates. What's going on here?
create sql view incidentsview ;
as select incidents.*, ;
employees.claimaintlastname, locationnumbers.number, jobtitles.jobtitle ;
from data1!incidents ;
left outer join data1!employees ;
on incidents.employeeid = employees.employeeid ;
left outer join data1!jobtitles ;
on incidents.jobtitleid = jobtitles.jobtitleid ;
left outer join data1!locationnumbers ;
on incidents.locationnumberid = locationnumbers.locationnumberid
dbsetprop('incidentsview','view','tables','data1!incidents')
dbsetprop('incidentsview', 'view', 'wheretype', 3)
dbsetprop('incidentsview.incidentid', 'field', 'keyfield', .t.)
dbsetprop('incidentsview.employeeid', 'field', 'keyfield', .t.)
dbsetprop('incidentsview.jobtitleid', 'field', 'keyfield', .t.)
dbsetprop('incidentsview.locationnumberid', 'field', 'keyfield', .t.)
dbsetprop('incidentsview.incidentid', 'field', 'updatable', .t.)
dbsetprop('incidentsview.employeeid', 'field', 'updatable', .t.)
dbsetprop('incidentsview.jobtitleid', 'field', 'updatable', .t.)
dbsetprop('incidentsview.locationnumberid', 'field', 'updatable', .t.)
dbsetprop('incidentsview', 'view', 'sendupdates', .t.)
Thanks for any help!
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