Hi Aleksey,
It's ERROR command not function. The same as
ERROR 'Update Conflict'
>
>Could you post complete repro code?
>
>Perhaps you should use ERROR command rather than function.
>
>
>>Asked this question before but after troubleshooting it some more I've narrowed down the problem so I'll simplify the question.
>>
>>Why does the following snippet cause my Cursor adapter to stop working completely, after I have an error 1585? The code is located in the .afterupdate method (native tables):
>>
>>
>>LPARAMETERS cFldState, lForce, nUpdateType, cUpdateInsertCmd, cDeleteCmd, lResult
>>
>>IF _TALLY = 0 AND lResult
>> ERROR('Update Conflict')
>> *this.updateconflict = .T.
>>ENDIF
>>
>>
>>If I comment out the error line and uncomment the this.updateconflict line, I'm able to handle the conflict by saving the values I entered, doing a cursorfill, reentering the values and then doing a tableupdate(1, .F.). That's the only way I can get an update with a conflict to work. Using the Error() line won't allow me to do any TableUpdate(.T.,.T.) or .cursorfill, or .cursorrefresh(). However, this code should work according to Microsoft and Code Magazine.
>>
>>Anyone know why?
>>
>>I appreciate any help you can give me.
--sb--