Paradox Community

Items in pnews.paradox-programming

Subject:Re: Cancelling Tcursor Action
Date:Thu, 25 Jun 2020 13:20:12 +1000
From:Tom Krieg <REMOVEtomkCAPITALS@sdassociates.com.au>
Newsgroups:pnews.paradox-programming
if tc.isEdit() then
    tc.cancelEdit()
endif

If your tc was updating an existing record then it will revert back to 
the original contents. If the tc was  inserting a record, the record 
will be discarded. UNLESS you issued a tc.postrecord which DID work then 
you'll need to do a tc.deleterecord(). Presumably you're just testing a 
tc.unlockrecord in which case a tc.cancelEdit() will handle it.

On 25/06/2020 12:39 pm, Peter wrote:
> If a tcursor fails (perhaps due to keyviol) what is the proper way to 
> back out:
> 
> tc.deleteRecord()
> or
> tc.endEdit()
> 
> Thank you
> 
> Peter


Copyright © 2004 thedbcommunity.com