Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View with LEFT JOIN will not update.
Message
 
 
To
22/10/2002 15:31:37
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00714040
Message ID:
00714061
Views:
19
Could you run GENDBC on your DBC then paste here the complete code for this view?

>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
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform