Hi Again
I appreciate your pateince and your support.
>Is ENTERDRAWPART a view on the table DRAWINGS? I'm assuming not.
IT IS NOT
>Is the table for ENTERDRAWPART a child table to DRAWINGS? If so, are you enforcing RI on it? Yes it is a child table and I do enforce RI.
>If so, then should you TABLEUPDATE DRAWINGS before ENTERDRAWPART? Do you have the key and updateable fields in the view set correctly?
Yes all is OK the worst is that it is the indexes of the table drwaings that are not updated
>Why do you nest your transactions?
I do realise that it is not necessary and even with one transaction the problem still occur. As soon as I remove the transaction all indexes are updates.
>When you include the transaction processing, which ROLLBACK is being hit?
None
>
>>Drawings(table) table is open with 3 as well as Enterdrawpart(view)
>>When I save with the code below a new record the indexes are not updated but if it is an existing record it is updated.
>>AS soon as I remove the Transactions command everything is OK.
>>
>>
>
>>updsuccess = .F.
>>DIMENSION atablesused[2,1]
>>DIMENSION aerrors[1]
>>atablesused[2,1]= "Drawings"
>>atablesused[1,1]= "Enterdrawpart"
>>*BEGIN TRANSACTION
>>FOR i = 1 TO 2
>> SELECT (atablesused[i,1])
>>* BEGIN TRANSACTION
>> updsuccess = TABLEUPDATE(.t.,.f.)
>> IF updsuccess
>>* END TRANSACTION
>> LOOP
>> ELSE
>>* ROLLBACK
>> ENDIF
>> some error handling
>> ntoterr=AERROR(aerrors)
>> DO CASE
>> CASE aerrors[1,1] = 1539
>> blabla
>> ENDCASE
>> EXIT
>>ENDFOR
>>IF updsuccess
>>* END TRANSACTION
>>ELSE
>>* ROLLBACK
>>ENDIF
>>RETURN updsuccess
>