For some reason this view will not update. I need to change it from an INNER JOIN to a LEFT OUTER JOIN because it was dropping records if the description record was not available.
When Adding: The error is "No Update tables are specified. Use the Tables property of the cursor."
When Editing: Press save and nothing happens. (I will debug more but I think it is similar to the above problem.)
Everything is setup correctly to update the table (at least I think so.)
* Tables Property is properly assigned
* Will not work with just source
? CURSORGETPROP('Tables')
source,reftable
? CURSORGETPROP('UpdatableFieldList')
{all fields from source},description,id
? CURSORGETPROP('KeyFieldList')
{key fields from source},id
Buffering = 3
BatchUpdateCount = 1
SendUpdates = .T.
SourceType = 1
UpdateType = 1
WhereType = 3
* additional filtering does exist but is not part of the problem.
* e.g. filter for the date and location which is part of source.
SELECT a.*, IIF(ISNULL(b.description), 'UNKNOWN', b.description) description,
IIF(ISNULL(b.id), 0, b.id) id
FROM source a LEFT JOIN reftable b
ON a.source == b.refcode
AND BETWEEN(?gdCurrentDate, b.effective_date, b.discontinue_date)
ORDER BY a.orderfld