>Lock the account > get the account balance > > while balance < debit amount > allow reducing debit amount > loop > > if debit is < balance > post the debit > endif >unlock the account >>
>If attempt lock > if not successful > ask user if they want to retry or give up > endif >endif >You can call it "error handling" or whatever you like, however, you don't need traditional error handling (ON ERROR or TRY). Just combine the two above, as follows:
* Lock the account if lock() get the account balance while balance < debit amount allow reducing debit amount loop if debit is < balance post the debit endif select account table unlock the account else MessageBox("Another user is working with this account. Please try again later.") endif >IOW, since lock() returns. .T. or .F., depending on success, no additional error-handling functions are required.