Hi Gustavo,
Your first error is because it is trying to add a record to prodvend and the second because it did sucessfully add the record to prd_dev and the second attempt causes a duplicate key violation.
Use the GENDBC utility to generate view code and look carefully at the DBSetProp('viewname', 'View', 'Tables') code and ensure that only prd_dev is named, also look at the field level Updatable properties.
>I have a view defined as the following sql select statment:
>
>select prd_dev.*, deleted(), prodvend.dsprod ;
> from prd_dev left outer join prodvend on (prodvend.cdprod = prd_dev.cdprod) order by prodvend.dsprod
>
>Only the fields of the table prd_dev has been marked as updatable
>fields.
>
>I have edited the view using tablebuffering = 5 (opt. table buff.) and when I try to tableupdate(), it returns .f. and the error message is 'cannot insert blank row from a view into it's base tables'. If I try again, I receive another error 'uniquiness of index 'x' is violated'.
>
>It seems very strange, since the tableupdate() insert the record on table prd_dev, but try to insert a record also on prodvend, and I don't want that behavior. The table prodvend is defined on view only to recall the product description, and the only field of this table is not marked as updatable or key field on view definition.
>
>Any help will be apreciated.
>Thanks for all!
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05